To be able to view contacts in your group (GroupA) you have to add a rule with Pass Any GroupA to GroupA.
What was successful:
I was able to see presence and chat with user from GroupA with users from GroupA and GroupB. I wasn't able to see presence or chat with other groups.
Search needs Iq packets. So Drop Any breaks search. I have added Pass Iq Any to Any and then i was able to search and login was fast again. Of course, you will be able to search for any user, and you will be able to add them to your roster, but they will show up as offline and you won't be able to chat with them.
So my rules look like this:
Pass Any GroupA to GroupB
Pass Any GroupB to GroupA
Pass Any GroupA to GroupA
Pass Any GroupB to GroupB
Pass Iq Any to Any
Drop Any Any to Any
Update: in bold