When running KStars/Ekos on macOS, I find I cannot hide the app using Cmd-H or the Hide command in the menu. It briefly disappears and then pops up again under whatever app was brought to the foreground. Interestingly this only happens when the Ekos panel is open. If I am only showing KStars, the app hides correctly. Is there some Ekos seeing that might be causing this? If not, it would be good if one of the Mac developers could look at it.
I wish I had a good answer for you (and I'm definitely not "one of the Mac developers") but I'll add that window showing/hiding has been an issue on the Mac for a while. Probably more of a Qt issue than a KStars issue. @rlancaste has looked at it for a while. You can try playing with the "independent window" settings in the "configure KStars" menus--e.g. in the FITS, Ekos, and INDI tabs there.