'MacOS agent app (UIElement is set), but show icon in dock?

Has anyone evert solved the puzzle of having a UIElement app ("agent app") on MacOS, but, still have the icon in the dock?

There's an old hint here but nothing has panned out yet ...



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source