Additionally, another reason for this problem is the divided settings options present in Windows. Some settings are present in the Settings app, some are present in Control Panel, while others have to be changed from the Registry app.

Change Screen Saver Settings

This is the most common solution or workaround for this problem.

Change Sign-in settings

In the event that the above solution does not work, you can set the computer to always require sign-in. This solution is a more proper solution than the previous one. In general, many people do not have to change this setting. However, if the previous solution did not work then you may have to change your sign-in settings. In order to do so

Change Registry Settings

This solution is for the tech-savvy. However, it is still recommended to proceed with caution as changing unknown registry settings may cause issues. A reason presented by Windows users is that registry applications may have been changed by any application and could cause issues such as Windows not locking. Therefore, it is suggested to proceed with caution in this solution. To change the registry settings

 SOLVED  Windows Goes to Sleep Mode Instead of Locking Screen - 78 SOLVED  Windows Goes to Sleep Mode Instead of Locking Screen - 64 SOLVED  Windows Goes to Sleep Mode Instead of Locking Screen - 27 SOLVED  Windows Goes to Sleep Mode Instead of Locking Screen - 80 SOLVED  Windows Goes to Sleep Mode Instead of Locking Screen - 69 SOLVED  Windows Goes to Sleep Mode Instead of Locking Screen - 42 SOLVED  Windows Goes to Sleep Mode Instead of Locking Screen - 7 SOLVED  Windows Goes to Sleep Mode Instead of Locking Screen - 5 SOLVED  Windows Goes to Sleep Mode Instead of Locking Screen - 30 SOLVED  Windows Goes to Sleep Mode Instead of Locking Screen - 12 SOLVED  Windows Goes to Sleep Mode Instead of Locking Screen - 21 SOLVED  Windows Goes to Sleep Mode Instead of Locking Screen - 13