So changing the renderer from DX12 to DX11 in UE5.1 worked for me.
In your UE project, go to project settings> search ‘RHI’> Platforms Windows> change ‘Targeted RHIs’ from DX12 to DX11
So changing the renderer from DX12 to DX11 in UE5.1 worked for me.
In your UE project, go to project settings> search ‘RHI’> Platforms Windows> change ‘Targeted RHIs’ from DX12 to DX11