Feels like laws are needed around this. Explicit, unambiguous laws. If you go above and beyond the law in terms of invasion of privacy, while acting as a law enforcement officer or on their behalf, you serve time in prison.
Provide a handbook to all law enforcement members explaining these rules. Give them access to whistleblower hotlines. Make an agency whose job it is to look into such complaints and file charges. The problems would vanish in a very short time.
But naturally, such a change would have to come from the top- and the government does not want to give up this power it has over its citizens.