After suggestion by @sje397.
The dummy window gives trouble on KDE. Changing the main window to a tool window also hides it from the taskbar, and seems to work at least on KDE and GNOME/Ubuntu.
Whether it works as expected on Windows and Mac is unknown.
Testing welcome…