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

UE crashes when I do any action during shaders compiling, autosaving or during other parallel processes that I can’t identify.
It happens more than 10 time during the working day.
Processor: 4 x Intel(R)_Core™i7-7700HQ_CPU@_2.80GHz
Graph: NVIDIA GeForce GTX 1050 Ti