Just like thoughtcrimes, right?
No, not like thought crimes. If you bash a police officer because he is trying to detain you, it's a felony. If you bash a fellow citizen because he is trying to detain you, it may not even be a crime.
I am certain that if you hit an off-duty police office in a bar because he came on to your woman, you would not be charged with assaulting a police officer. It's not WHO the person is, it is the job they are performing at the time.
Maybe that's where the confusion lies.
If you attack a "regular joe", you've only attacked a person. If you attack an LEO in the course of doing his duty, you're attacking not only the person, but also the society that has charged him with that duty.