It seems like it’s an issue with DX12 DoF: https://forums.unrealengine.com/t/ue5-dof-flickering/1366598/8
Unfortunately, there’s no real fix for it for now. I’ve tried switching the RHI to DX11 and it worked, but DX12 is required for some features, e.g. Nanite.