When you full screen an app via the function you have made, it doesn't hide the bar in case if the application has a transparent background, I have made it so that when the hotkey is pressed, the bar is also hidden.
Before:
After: