If you are facing issues with Ubuntu autohide not working then this fix will help you:
https://askubuntu.com/questions/1313408/dock-auto-hide-not-working-on-desktop-ubuntu-20-04-1
Install the dconf-editor and go to org -> gnome -> shell -> extensions -> dash-to-dock
And disable the intellihide:
After that that autohide will work correctly!