Tool windows should hide by default when the app is no longer the frontmost app.
this worked up to Qt 5.11.
The doc for Qt::WindowFlags Qt::Tool says:
Indicates that the widget is a tool window. /* ... */ By default, tool windows will disappear when the application is inactive. This can be controlled by the Qt::WA_MacAlwaysShowToolWindow attribute.
but: it does not disappear
and: there is no Qt::WA_MacAlwaysShowToolWindow to correct it...