Give users with roles the option to show/hide them
Back in 2017 we made the decision to hide admin/moderator roles because we dealt with a lot of harassment towards staff users before.
However, in self-hosted environments and in general so people do have possible means of contact to staff, members with roles should be able to decide if they want to show them regardless.
Extend roles with a field that specifies that they can be shown or hidden (no idea for a naming here), and extend the MM-table (users_roles) with a flag if the role is visible or not.
Accompany this with a settings view only visible to people who have any role that is allowed to be shown (ex. the canny_consent role is not one of those, administrator or moderator would be) that allows a per-role setting of the visibility.