RLS decides which rows someone can touch, not which columns. Two ways out:
1. Column privileges (quickest):
revoke update on profiles from authenticated;
grant update (display_name, avatar_url) on profiles to authenticated;Now an update that includes role fails with permission denied for table profiles, while name/avatar updates still go through your RLS policy.
2. Move role to its own table that users can only read. Cleaner if roles will grow.
Also add with check (id = auth.uid()) to that policy, so nobody can change id to someone else's.