A more recent and more famous example is the rapper Tupac who witnessed police beating up a guy for no reason. Tupac grabbed a gun and told them to stop, and when the police shot at him, he shot back wounding one, and wasn't found to have committed any crime. Randy Weaver shot and killed a federal agent and was exonerated at trial.
These are just examples from memory. I'm sure if you looked you'd find many more. It may not be wise to shoot out with the police, and you'd better be certain you're right, but you're absolutely permitted to use your guns on the police and kill them in some circumstances.
https://newsmaven.io/pinacnews/eye-on-government/texas-man-f...
Also, Indiana for example explicitly legalizes home defense against "public servants"[1].
[1] https://codes.findlaw.com/in/title-35-criminal-law-and-proce...