@Anthony Moulin Thank you for reaching out to us. As I understand you want to restrict guest type user while accessing a security group.
Yes there is a restricted access permission level for guest accounts where guests cant see membership of any groups. When guest access is restricted, guests can view only their own user profile. Permission to view other users isn't allowed even if the guest is searching by User Principal Name or objectId. Restricted access also restricts guest users from seeing the membership of groups they're in.
Restricted guest permissions: In the Azure portal, they can find the list of groups they're in by searching for their object ID in the All users list, and then selecting Groups. They can see only limited details about the group, notably the object ID. By design, the Name and Email columns are blank and Group Type is Unrecognized. In the My Apps portal, they're not able to access the list of groups they own or groups they're a member of.
Let me know if you have any further questions. Please feel free to post back.