Weirdly, I've just had this problem myself. Here's the solution.
Create a global boolean variable. Call it "hidden?" or similar. Create a rule in your first actor (the one that will be on front) that changes hidden? to true if mouse/touch is overlapping. Use the "otherwise" part of the rule to change hidden? to false.
When you check if your second actor (the one that is behind) is touched, create a timer on a very short delay (e.g. 0.03s). Create a rule within the timer that checks whether hidden? is false. Then place your normal rules within that rule.
Maybe there is a more elegant way to achieve this but it worked for me.
Comments
Create a global boolean variable. Call it "hidden?" or similar.
Create a rule in your first actor (the one that will be on front) that changes hidden? to true if mouse/touch is overlapping. Use the "otherwise" part of the rule to change hidden? to false.
When you check if your second actor (the one that is behind) is touched, create a timer on a very short delay (e.g. 0.03s). Create a rule within the timer that checks whether hidden? is false. Then place your normal rules within that rule.
Maybe there is a more elegant way to achieve this but it worked for me.
Stu