You are correct that you can't stop a USER from amending it but you can stop the Role from being able to change it.
For instance if you want every user with the Test234 Role from being able to change their Role in My Settings you will need to configure that Role and then remove the Role field from the My Settings page.
To do this search for Profiles

Click on the Assist Edit (3 little dots) of the Profile you want to change and click on Customise Pages. This will open up a new tab for you to make your changes.

Go to My Settings in that tab and click on the red arrow in the role field and select Hide
Then click on the red Done button to complete your customisation.
I would suggest also going to the User Personalisation Card and hiding the Profile ID field from that card.
I hope that makes sense.