But theory is not practice. In practice, if King Charles shivved someone in Trafalgar Square tomorrow, crowing about how he can't be prosecuted, what would happen would probably be something like:
- parliament would try to pass a law saying that we were a republic now (or that harry becomes king or whatever)
- charles would refuse royal assent
- parliament would amend the bill to remove the requirement for royal assent for primary legislation and then claim they'd pass it using itself
- people would point out that this is clearly invalid and self-referential
- it would go to the UK supreme court, who would twist themselves into knots to conclude that it's actually fine, because they know as well as anyone else that that's the only conclusion that wouldn't result in riots and the collapse of the state as a liberal democracy
- all the institutions who matter would agree that we're a republic now
You are taking an extreme example. How about if he sexually assaulted an underage girl a la prince Andrew and denied it happened? The same thing that happened to Prince Andrew would happen, ie nothing. The royalty is above the law unless they do something unbelievably stupidly obviously bad and admit it. And it that case they would just claim that one particular royal is crazy and give the power to the next in line.