Two things:
1. The UK parliament reversed course and brought back Charles I's son to be Charles II. In doing to it executed a ton of people responsible for revolt. That included Oliver Cromwell -- despite the fact that he was already dead. They dug him up, tried him, convicted him, executed him, and put his head on a spike for decades. So it's not clear how much power that precedent could hold.
2. Charles III is King of the United Kingdom. The title of "King of England" was retired by Charles I's father. Charles I was King of Great Britain.
I don't know that I'd go so far as to say reversed course. Things didn't go well for Cromwell and the people who executed Charles I but also stuff didn't revert. Charles II is not a modern monarch but when Parliament does stuff he doesn't like he feels obliged to try to dodge that rather than defy them as his father did.
Charles I was executed in 1649. He kept starting wars, Parliament told him to stop, he wouldn't so they tried him for Treason, he asserted that he necessarily couldn't commit treason because he was the King, but Parliament convicted him and sentenced him to death.
Parliament's rationale, then and now, is that their allegiance is to the Crown, a symbol of the country, not to some bloke who happens to be wearing it. He is just a temporary living symbol, even more replaceable than the (relatively expensive) metal object.
You can prosecute individual members of parliament too, this too isn't a hypothetical, if they're convicted of anything serious enough they automatically lose their seat and a replacement is elected, while for more minor offences like anybody else they might keep their jobs if they can suffer the embarrassment of everybody knowing they're a crook
Unlike in the US no individual holds a "pardon power" which could enable them to nullify a conviction, the Crown Power to do this is in practice exercised via a committee which investigates miscarriages of justice. Of course in principle a British Prime Minister could just insist they have this power anyway, and if a Parliament comprising largely of their party members goes along with it, so be it, on the other hand it's hard to see why the millions of British people who didn't vote for them should accept this, and it's not as though Britain hasn't had civil wars already.