Method 1: Follow the steps:
Press Windows Key + X.
Select on Control Panel.
Click on Power Options. On the left, click on "Choose what closing the lid does". Click on the drop down menu for "When I close the lid" and choose "Sleep" or "Hibernate.
Method 2: I suggest you to run in-built Power troubleshooter and check. Follow the steps:
Press Windows Key + X.
Click on Control Panel.
Select Troubleshooting on the left pane, click on View All.
Click on Power to run the troubleshooter.
Method 3: If the above method doesn’t help, I would suggest you to reset and restore all of the default Power Plans back with their default settings. Follow the steps.
Press Windows Key + X.
Select Command Prompt (Admin).
At the command prompt, type powercfg -restoredefaultschemes, and then press ENTER.
At the command prompt, type exit to exit the Command Prompt window.
Restart the computer and check with the issue.
Let us know if the issue is resolved or if you require further assistance.
This is what i found here
Microsoft help site