To solve this, you can put all your "mouse objects" into a family.
Then, you do your mouse events like "is cursor overlapping family" and also add 1 more event "pick top/bottom family" and choose "top".
This will only pick the the top sprite if multiple sprites are overlapping.
Hope this helps!