Shadows are really bad

I don’t have an answer for you because we can’t even begin to troubleshoot if you can’t tell us what type of shadows you’re actually using.
See:

In case you are in fact using VSMs, here is the documentation which has lots of information you can look into for debugging.

If you’re using CSMs, it is normal for their quality to degrade at a distance, all you can do is bias the distances (which will make nearby stuff look worse so far stuff can be better) or change their resolution (which effects the quality at all distances).

Distance field shadows are often used in addition to either of these methods, especially at far ranges.