As i understand it, your main issue is not the layering/stacking and order of windows but to have your panel visible when app is in background? What do you mean by „not active, deactivated“? Could you elaborate on this with terms from NSProcess?
What is the overall requirement for this? Maybe there are other ways to achieve it.