In the event calling the function you have a condition that makes a list of all object1 that overlap object 2.
In the function you have an action that picks all the object1, because there is no condition limiting the picklist.
See it that way. You have always a 'picklist'. The picked objects stay in that list until you make another list.
Pick conditions are filters to shorten the picklist, they make a list, they do not pick. Unless there is only one object in the resulting list. But even then you should not see it that way. The actions are the pickers, they pick objects from the pre-filterd list.
The condition 'if object1 overlaps with object 2' makes a picklist of all instances of object1 and all instances of object2 who overlap. The action 'object 1 set invisible' takes all object1 instances in that picklist and makes them invisible.
You could now think: no pick condition means no new picklist. And that is exactly where things go wrong.
If you make a blanco event, followed by an action 'object 1 set invisible', then there was no filtering. The picklist contains all the objects. Every and each one. The action picks from that list all the object 1 instances.
Tip: Make a variable object1picked and a variable object2picked. Set those in an action to object1.pickedcount and object2.pickedcount right after a pick condition. Monitor those variables to understand what is gooing on. Loop true them with object(loopindex).