u need to add a condition that blocks invisible objects to be clicked.
u can do all that by doing a group in the eventsheet, add ur all events that are affecting the "invisible" objects and enagle disable that group when "layer1 is visible /invisible" toggle group "1"