Jira treats these actions differently.
Removing a user from a project role can be done with the required Jira admin permissions. But removing a user from a group requires organization or site administrator permissions.
So if you don't have permission to remove the user from the group, you may see an error when trying to revoke the access.
In that case, you can create a remediation ticket and have someone with the required permissions take care of it.