You guys are going to end up going round & round on semantics on this one.Yes they do. Law enforcement cannot violate clearly established law, including constitutional law. Constitutional law is a part of training and certification.
As far as gun laws are concerned, enforcement of a clearly unconstitutional law could expose LE to Section 1983 claims. An example would be applying NY concealed carry laws in the face of the recent SCOTUS opinion about that.
They don't get to DECIDE what's constitutional in the way the courts do that actually makes something constitutional or not. They do have to make decisions about whether what they're doing is constitutional. The rub, as you point is 1983 exposure for clearly unconstitutional laws. Like, pre-Dobbs, they couldn't arrest someone for having/performing an abortion at 6 weeks regardless of what laws were on the books. Sheriff's categorically deciding to not enforce red flag laws that haven't been decided on at the constitutional level is a different ball of wax altogether.