Hello Bruno Tecton, thanks for posting this in our community.
This issue usually happens when the lid close action settings are overridden by other factors like Fast Startup or Hybrid Sleep.
First, verify your lid close settings. Open Control Panel, go to Power Options, and choose what closing the lid does. Make sure both “On battery” and “Plugged in” are set to Sleep, then save the changes.
Next, check the advanced power settings. In Power Options, select Change plan settings and then Change advanced power settings. Expand Power buttons and lid, and confirm that the lid close action is set to Sleep for both battery and plugged in.
You should also disable Fast Startup, as it can cause shutdown-like behavior. Go to Control Panel, open Power Options, and choose what the power buttons do. Click Change settings that are currently unavailable, then uncheck Turn on fast startup (recommended). Save the changes and reboot your system.
Kind regards,
John Oli