Hi Autranaut.
Welcome to the Microsoft Community.
Your computer will shut down after the box cover has been on for a few hours, even if it is set to close the computer cover without turning the computer off. This is an intentional design to prevent the computer from staying on without the owner's knowledge. You can turn off this feature by doing the following:
- Press and hold “Win + R” at the same time and type “devmgmt.msc” in the text box that appears, then click “OK”. You will open the Device Manager.
- Find “Intel® Management Engine Interface”, right-click on it and select “Properties”.
- Switch to the “Power Management” tab and uncheck “Allow computer to turn off this device to save power”.
If you have set your laptop not to do anything when the lid is closed, then your computer will not shut down automatically when the lid is closed.
Best Regards,
Raylan-MSFT | Microsoft Community Support Specialist