I know it's a joke, but why would a shapeshifter 350 years into the future on a planet 50 lightyears away be guilty of any of the same prejudices that our local cops are?
If you actually watched the episodes you'd know that a) he didn't do fucked up shit, he made a mistake and b) he actually cared about justice and c) he not only knew about the mistake, it was eating him up inside.
"No cops at pride" is not about the prejudices of individual cops, be they fictional future shapeshifters from half a galaxy away, or real police here and now. There are LGBTQ+ cops out there.
The issue is the fact that cops enforce the law regardless of how just the law might be. Odo was the chief of security aboard Terek Nor while it was under Cardassian control, and while in that role rushed three innocent Bajoran workers to execution so he could maintain order aboard the station.
Even once the station became Bajoran owned and Starfleet operated, Odo was still willing to conduct illegal surveillance, lock people in the detention facility on trumped up charges, and impose a strict curfew. Personally I don't think it would be too much of a stretch to assume that Odo would be willing to lock up people participating in a Pride event for no other reason than that he was told to do so, and they were causing a minor disruption on the Promenade.
Because when he was learning to live among humanoids, the rule of law provided a form of structure he could understand, and Odo has yet to surpass the cognitive development milestone of a 12 year old.