I recently had the D3D device error. This is what I did to solve it. I have played 100's of hours since doing this and the error has not repeated. Not a guarantee it will not repeat, but so far so good.
As I indicate in the video title, I am on Win 11, Intel hardware and NVidia GPU and never used any mod.