Gnome’s top bar can auto-hide itself like the left dock panel does via a Gnome Shell extension.
In Ubuntu 18.04, you can enable the feature by installing the gnome shell extension easily from Ubuntu Software.
In Ubuntu 20.04, it’s still easy to install the hide top bar
extension, though the Software utility does not longer handle the extension packages.
1.) Press Ctrl+Alt+T on keyboard to open terminal. Then run the apt command to install the extension:
sudo apt install gnome-shell-extension-autohidetopbar
Type user password (no asterisk feedback) for sudo prompt and hit Enter.
2.) Once installed, restart Gnome Shell by pressing Alt+F2 and type r in the pop-up “Run a Command” box and hit Enter.
3.) Finally open either Extensions or Gnome Tweaks (both available to install in Software), and enable “Hide Top Bar” extension.
That’s it. Enjoy!