Hey, I would suggest you to downgrade to 5.0.3 as did I, but if it’s not an option, there is a temp fix that I described here:
TEMP FIX: If in UE5.1 you will turn off SM6, turn on SM5, turn off virtual shadow maps (switch to another type) and turn on Raytraced shadows - issue will be gone.