In-game windows are always painted before non-in-game windows.
I'd like to mention though, that the above behaviour is by design. As you click a window, it becomes a foreground window. If the window covers the entire screen, it natually obstructs all the other windows. You might for example load the smaller window as a sub-window of the large one to prevent this.