Securely warn, this method require you not to lock your screen(Windows 10, Win+L).
So anyone who can touch your computer they can fully access your PC login account.
This is strange. I don't understand why.
Under Windows 10, my device will force to sleep once I turn off the monitor
(hardware or software method), or lock the screen(Win+L).
I mean, all of the legacy Desktop Win32 Program paused. But Windows Store Apps is fine.
The others posted some method not work for me.