How do I fix spiky shadows in UE5 Preview 2

You can try “r.Shadow.Virtual.ResolutionLodBiasDirectional” with -1 to -2 if you still want to use virtual shadow maps.