Not sure this is Intended or Bug.
example, i have a Text Object ( which can be click. ), in LAYER 6
in some condition, LAYER 6 was invisible, so The Text Object was invisible too.
but, it still functions.
you should add a condition that if the layer 6 visible-> you can interact with it. If NOT, stop interacting.
ya. current add mode condition on those "mouse click" event..
Develop games in your browser. Powerful, performant & highly capable.
you can put a sub-condition to check this before do an action.