I went to Settings>Privacy. It says Screen Lock Off
How can that be? If I close the laptop and then open it again, I find a screen showing the date/time in big characters. Then I press the Esc key and now the system prompts me to enter a password (by the way it does not say if it is the root password or the regular user password; I tried with both but it rejects both!). And it shows a button with 'Unlock' written on it! So it has locked the screen despite the fact that Settings>Privacy says Screen Lock Off.
EDIT: This is Ubuntu 18.04.
43 Answers
Open your settings dialog - select "Privacy" on the left side, then "Screen Lock"
Now turn off the "Automatic Screen lock" and "Lock Screen on suspend"
Turning off both worked with my hardware.
2I am using elementaryOS Hera 5.1 which is built off of Ubuntu, so I am not sure if your settings will be identical, but as you can see I have an option that says when lid is closed: suspend which when I enter the administrative password, I can set to do whatever I want. This was in System Settings > Power. If you do not have this setting let me know.