Hi @Viiiinx
This can be frustrating indeed. There are many things can do this , even switching on a second monitor cause the gpu to reset outputs which appear like a device unplugged.
Suggest you start by removing your device drivers for you gpu using DDU.
Reinstall the latest version and also update or reinstall directx12 (after the gpu drivers)
If that fails repeat but use an older driver.
Its frustrating i know and time consuming. But worth a try.
If that fails try switching to d3d11
Hopefully one of these will work for you