This idea is absed on the following snippet for wezterm: https://gitlab.com/-/snippets/4798512
This should work with most terminals, as long as they allow for custom titles or if you don't mind using them only in dropdown mode.
The idea is to create a down rule that forces the window to stay in the position you want, and to create a script using kdotool to execute the terminal if it's not running, and minimize/show it if it's running.
This should also work in x11 with minimal changes. I personally like for the terminal to stay on top always, and for the keybind to hide/show it, regardless of my current focus since I work with two monitors and the first press gaining