If it breaks something that Tesla supports, they do not have to provide warranty coverage for the thing that was broken. That's understood, and legally explicit.
As for safety of the vehicle, I don't get your argument, I could pull the brakes off the car and Tesla couldn't stop me, that DEFINITELY affects the safety, but you think they should lock me out of the software? If I have physical access to the vehicle, which is kind of a given being that I'm driving it, I can do LOTS of things that "affect the safety" and not only can Tesla not stop me, as a society we have decided that they shouldn't stop me, this is the basis of right to repair laws, and warranty laws that prohibit voiding warranty if I modify things. Yet as soon as it's software people get all panicky and think we should do everything the opposite way? There's no difference between software and hardware for what I should and shouldn't be allowed to do. I own the car, Tesla doesn't. In the world of physical objects everyone is ok with that, we need people to be ok with that in the world of software too or we are in for a very distopian future.