Unless specifically exempted, by statute, we are ALL subject to the same laws.
I heard the original NY SAFE law (right after the Sandy Hook shootings did not exclude LEOs, and after a bit of scrambling, an exemption (for at least some things) was added.
Back when California put the SKS carbine on their list of banned guns more than a few were owned by LEOs privately. They were not excluded. Heard one report of a cop, when he turned in his SKS, as the law now required, was actually arrested for possessing it.
Never did hear how that one got resolved, but I suspect they quietly dropped it when someone finally realized that arresting people (particularly a serving cop) for OBEYING the law was sending a poor message.
I'd say it all depends on the particular state, the specific laws language, and the zealotry of the prosecutor's office.
Why is it you (outside of the gun community) never hear of the REAL "Gun Control Loophole"? You know, the one that is usually put in that exempts police, military, etc from certain laws?
It was a source of amusement to me back when the Lautenberg law forced so many agencies to have to pull officers off the street. Under that law, ironically written and passed without any of the usual "loopholes" (even for on duty possession), as they could no longer be legally armed.
The law of unintended consequences applies to everyone. Too many of those crafting and supporting laws apparently can't understand that, or don't care.