On Ubuntu 19.10, when closing the lid, the laptop goes into sleep.
When opening the lid, the power is resumed and immediately seeing the screen to choose the user. After choosing the user and typing the password, a fresh session is created - not the expected return from sleep behavior.
This means that somehow a logout was performed, which is strange.
When pressing the power button (manual sleep), which probably does the same sleep sequence, everything works correctly. After the sleep happens, I can close and open the lid or just press again on the power button and everything works correctly. I immediately see the password option and the session is shown where I left off.
I read info on the subject, like playing with the grub
scsi_mod.scan=sync but nothing worked and didn't find explanation regarding the difference in behavior between manual suspend and closing the lid.
I understand that some think this question is duplicate to How to disable account logoff when closing lid of laptop. The difference is the settings, the OS version and problem description. My setting is already set to sleep for lid closed. The potential dup question is set to logoff.