Laptop still on when lid closed

Solution 1:

Does your laptop have dedicated Nvidia GPU? If yes then turning off the hybrid graphics will help.

Solution 2:

You better use the power button to put your laptop to sleep.

I've noticed that the Suspend when laptop lid is closed option in Tweaks doesn't seem to have the expected behavior for some laptops. So, if you close the lid, it actually just turns off the screen, instead of putting the laptop to sleep.

So, manually suspend your laptop just to be sure.