Solution 1:

That is the default behaviour. Ubuntu dock uses "intellihide" mechanism (i.e. dodges windows only) when it is set to auto-hide.

If you wish to keep it hidden until mouse-hover, open Terminal and run the following

gsettings set org.gnome.shell.extensions.dash-to-dock intellihide false