Buttons on invisible layers can also be touched. You need to add another condition "Layer N is visible" to events 20 and 24.
Also, I told you this already - you need to use "On touched" events for buttons, not "is touching".
And use layer names, not numbers. If tomorrow you decide to add a new background layer, you will have to update all layer numbers in all events. With layer names it will not be necessary.