Fixed the issue with the incorrect deletion of a group from a user profile.
The issue when deleting a group from a user's membership list led to the deletion of this group from Bitbucket.