I would use a variable condition. Assign each menu a unique number, and add variable ActiveMenu. Add the condition ActiveMenu=x so that you can only interact with the currect active menu, if they stack.
Alternatively, you can just replace the previous menu completely when opening a new one, then you dont have to worry about stacking/overlapping at all. You can save what the previous menu was in a variable as well, for when you need to go back.