I do not like gdm on Ubuntu 18.04 so I have replaced it with good old lightdm and unity-greeter with the following command:
sudo apt install lightdm unity-greeter
I've also selected lightdm in dialog menu during installation.
Now it appears to work partly:
When I reboot my computer lightdm is shown and I am able to login into my system.
But if I leave my computer alone and it locks automatically after 5 minutes or if I lock it with Super + L then gdm lock screen appears. How it can be fixed?