What is the reason and/or fix for UE5 (5.03 & 5.1) freezing my whole pc?

I have an nvidia rtx 2080 gpu in the laptop. I have zero problems with dx11, it all started after enabling dx12 and sm6 to use nanite in the project. I tried installing older drivers, but the result was the same.