I would not rely on that. The Attorney General can withdraw prosecutions, and is a government minister (although not technically in the Cabinet).
Parliament can do anything, it just usually doesn't. This includes retroactive legislation to decide that you did not win a lawsuit that you actually did win (Reilly and Wilson v Secretary of State, although that itself was eventually ruled unlawful). The infinite delay of Bloody Sunday prosecutions is probably the biggest example in UK discourse.
No country is safe from this if enough authoritarian-collaborator political appointments are made (such as happened to SCOTUS). It should really be viewed as a form of coup.