The latest version of my widget Panel Colorizer (2.0.0) can do this. It needs to be added to a panel to configure its appearance and behavior.
There are two ways it can be used:
Creating two presets with the Stock panel settings > Show/Hide toggle enabled and disabled, then binding those to Preset Auto-loading condition like fullscreen (hides) and normal (shows).
The other way is manually swapping these presets using D-Bus as described in the README or more advanced by just toggling the specific setting without needing to create presets:
# hide all
dbus-send --session --type=signal /preset luisbocanegra.panel.colorizer.all.property string:'stockPanelSettings.visible {"enabled": true, "value": false}'
# show all
dbus-send --session --type=signal /preset luisbocanegra.panel.colorizer.all.property string:'stockPanelSettings.visible {"enabled": true, "value": true}'
How does this work?
It toggles the visible property of the window containing the panel, effectively acting as if there was no panel on the screen, the popups on the hidden panel can still be activated and will spawn as if the window was still there but aside from that it seems to work as I wanted.