Totally disable selecting windows with Mouse?

When you hide a commandWindow, for example, a title screen, because you think images are suitable to represent them, the woe is that even when the command window is not visible, your mouse would still select them, even being it invisible, due that you only set the window not visible, so if you click any coordinate on your window where the commands are, the mouse would select it. 

Is there a way so you can disable selecting with the mouse when it touches the commands from the ones you hid?

Original thread: https://forums.rpgmakerweb.com/threads/totally-disable-selecting-windows-with-mouse.49661/