Here is a description for the steps how to hide the top bar in Ubuntu 22.04:
1. Open the Show Applications menu,
2. Select the Extensions application (you can see the tutorial for installing the application on the video link • Cara membuat dock dan panel transparan di ... ,
3. Select the link address option "https://extensions.gnome.org",
4. Type in the extension search field using the keyword "hide top bar",
5. Select the "Hide Top Bar" extension,
6. Change the off button located on the right to on,
7. Select the Install option,
8. Return to the Extensions application, type the keyword "Hide Top Bar" in the search feature,
9. Select the Settings option on the "Hide Top Bar" extension,
10. Activate the desired features on the Sensitivity tab,
11. Then to hide the Top Bar, you select the Intellihide tab and deactivate the option "Only hide panel when a window takes the space",
12. Done.
Hope it is useful.