1. A camera body to which a lens barrel having an optical system can be attached, the camera body comprising: a controller that controls the camera body; an image sensor that captures an object image; and an image sensor actuator that drives the image sensor along an optical axis, wherein the controller determines a change in an optical state of the object image captured by the image sensor and, in response to the determination, drives the image sensor actuator to move the image sensor to a reference position located within a movable range of the image sensor.