Videotutorial: https://youtu.be/3LwCu9MWUyQ
CenterFocus DOF is a small add-on for Blender that automatically updates the focus distance of the active camera to match the point at the center of the frame.
Simply enable the automatic option, and the Focus Distance field will always stay synchronized with whatever is in front of the active camera, in real time.
A Smooth Transition option is also available, allowing the Focus Distance parameter to change more gradually, helping to create less abrupt transitions.
This add-on and its options can be easily enabled or disabled from the dedicated panel inside the Camera's Object Data tab.
The center point of the frame—used to calculate the focus distance—can be easily identified using the Composition Guides. For example, you can enable the Center option in the Viewport Display > Composition Guides section of the camera object.