# chattr +i /etc/resolv.conf
# lsattr /etc/resolv.conf
----i---------e------- /etc/resolv.conf # chattr +i /etc/resolv.conf
# lsattr /etc/resolv.conf
----i---------e------- /etc/resolv.conf2. it is not a nasty habit, but a configuration. If you do not want it, you can configure systemd-resolved not to do this.
3. it is for a very good reasons, and there were written pages and pages about the issues, what those are; so when you understand why, you won't reconfigure (2) anyway.
If this is a real concern, I'd be more mindful of what's being given privilege. It's atypical to chase - going as far to remove bad actors
edit: Wrote this while still half asleep, tested - wrong lol. Keeping to prevent more folly
My corporate macbook was at its most stable when I had set /etc/hosts immutable and the corporate chef got stuck and nobody yelled at me. Of course, a couple months later I did a mac os update and some corporate spyware interfered with the gpu driver... would have been updated if chef had run in the past three weeks. Whoops.