Unreal Engine is exiting due to D3D device being lost. (Error: 0x0 - 'S_OK')

This is typical issue with Intel+Nvidia laptops, in most cases it is power management switching between NVidia GPU to Intel GPU in CPU and vice versa. Go to power management and set as much high performance settings you can set, maybe you will find some settings about in NVidia (which sound like you already did), make sure you got your laptop plug in to AC which encourage laptop to use NVidia GPU more often. UE4 can idle quite heavily unlike typical game so it might confuse those systems sometimes.

That said i never seen case with S_OK error code, so it might be some special case. Is there any perticilar moment this happens? Try to observer more as this might help.