Why not just use the -n switch with the /query command to open the query window, but minimize it?

Is the active window the status window? Try using /window -a $qt(%active_window)