Search permissions that you configure has more priority than what you set up in “Not permitted Groups”. To make it easier to understand, if there are conflicts between two configurations, we will prioritize search permissions. In your case, users in Group A are able to search other members in Group A.