Problems with external monitor when laptop lid is closed / systemd-logind restart fails

I am completely new to Ubuntu Mate 20.04. I was looking for my issue through the internet for long hours and unfortunately I haven't found the solution.
Generally I would like my Ubuntu Mate behave like Ubuntu Gnome in terms of the lid being closed when external monitor is connected. A workspace should limit to external monitor only. What happens is that I can still use workspace from closed monitor.
I followed instructions on [SOLVED]Ubuntu 16.04 - problem with laptop on docking station + external monitor
but I have a problem with command 'sudo service systemd-logind restart'.
My terminal says 'Failed to restart systemd-logind.service: Unit systemd-logind.service is masked.'
sudo systemctl start systemd-logind
also does not work. The laptop I use: Lenovo Thinkpad X280, Ubuntu Mate 20.04 64bit
Additionally when I turn off laptop monitor manually in settings, the sound output disappears and no sound can be heard.

Please forgive me my mistakes in English.