In civil actions under 42 U.S.C. 1983, they just come right out and say it: governmental wrongdoers are immune from being held accountable for their wrongdoing.
But even there, no one has ever suggested that they would be immune from criminal prosecution.
“My administration is the only thing standing between you and the pitchforks.”, says the president. It’s part of a siege mentality.