Unreal Engine is exiting due to D3D device being lost Unreal 4.27 and 5.1.1

Solved!!!

It took close to half a year to find a solution. Constant crashes and lost work, so much time wasted…

I changed the processor and motherboard. The old, which I am sure was the problem for Unreal, was AMD Ryzen 9 3950X 16-Core.
I am assuming it was the processor, as I found some people on the internet also having problems with Unreal, while using this processor. It was very misleading as it is GPU crash, and it does not have internal GPU, so it is not related to switching to internal.

Maybe someone in the field can explain why this could be the cause?

Changed to 12th Intel i7-12700F. No crashes in ~4 days.