Why is it that after computer has idled for a long time, Windows turns black and does not respond to any key presses? I must do a hard shutdown

If I leave the computer on overnight, the next morning, the computer will be on, but the screen will be black. And it does not respond to any key presses. I have to do a hard shutdown.

I’ve checked the Event Viewer, but it didn’t provide much helpful information. What else can I do to find the reason for this non-responsiveness?

enter image description here

The power option has also set to never sleep

enter image description here