Hello,
So at first I want to deeply apologize for my poor language.
I had this issue thrice. Once while just being on the Internet, and twice while closing game. Red Dead Redemption 2 to be clear. Fans started running very loud at the maximum power, and the creen went blank. There was no other way to close the PC, but with the button on case. Once I turned the PC back, there was no native resolution (5120 x 1440), but the lower one. I had to install Adrenalin in both cases to bring the drivers back.
My CPU is Ryzen 5 9500x and I have a power of 1000w.