In this guide I will tell you what may be the cause and how to resolve this issue.
Solution 1: Change Power Settings
A freshly installed Windows 10 will automatically turn off your computer screens after 10 minutes. To disable that, right-click on the Windows-icon in the bottom left corner of your taskbar click on Power Options. Now click on Change plan settings for the selected plan. In the now opened window you are able to change the values for Turn off the display:. Change it to Never or set a time. Test to see if this resolves the issue, if not move to Solution 2.
Solution 2: Malware Scan
Certain malwares on boot can also trigger this behavior. Users reported, that after scanning their systems with Malwarebytes, they were able to have this issue resolved. See further steps here
Solution 3: Repair System Files
If system files are corrupt, they can prompt Windows to “skip” the settings user has specified. Windows has a built-in utility called SFC Scan to repair system files. See steps here
[SOLVED] Windows Goes to Sleep Mode Instead of Locking ScreenHow to Fix Start Menu Opening Up by Itself on Startup from SleepHow to Fix Avast Turning off by itselfHow to Fix a PS4 (PlayStation 4) Turning Off By Itself