As shown in the gif, the shadow in eevee is clipped by the camera distance.
The same is true for F12 rendering. Where are the options to improve this issue?
If this is happening with a "Sun" type light, you want to select the "Light" object in the scene, and in its Object Data Properties Panel, adjust the Shadow -> Cascaded Shadow Map -> Max Distance setting. Even though this appears in the Light's properties, as per the manual, it's related to camera distance:
Cascaded Shadow Map -> Max Distance.
Distance away from the view origin (or camera origin if in camera view) to cover by the cascade. If the view far clip distance is lower than Max Distance, the lowest of the two will be used. Only works in perspective view.