I noticed that groups where I’m not allowed to see the members still appear on the user profile.
For example, as long as you don’t join @new-new-testers, you cannot see the members of that group:
But when you look at a user profile of a member, you can still see that they are a member of the group:
However, when you click the 3 dots to see all group memberships, it is hidden.
This also affects groups where you are not allowed to see the members even if you are a member yourself.