Unfortunately, there may be a bad apple(s) in every barrel. Without some sort of punishment, this activity will continue. Simply closing and sealing the case provides immunity to police. I used to run campaigns, kinda as a hobby, and I had a few judicial elections. I spent a lot of time in courtrooms waiting for the judge to wrap things up in order to have a chat and often we'd also discuss the case being presented. Judges are well aware that cops lie. But there isn't much they can do about it. They lie about big stuff and small stuff. Defendants lie, they lie about big stuff and small stuff. But most first time defendants who do not have a working knowledge, experience of the court system, are flustered by cops lying and are reluctant to defend themselves when a cop does so in court. This was some time ago when I was witnessing cops smiling to themselves while leaving the courtroom and flustered defendants not knowing what to say or what to do. Judges would say that cops were "fudging" on their testimony. I think will all the recent activity of cops and courts and Black Lives Matter and body cams ... the whole enchilada, has opened up people's eyes by shining more light on our judicial system. I think today it is harder for cops to lie in court. I think people are becoming more confrontational against a government system when it become bad, both individually and collectively.
I had a day in court. I was arrested for photographing cops arresting an AP photographer. The cop "fudged" when he testified in court ... when I was called up, I call him a "Goddamn Liar" ... as I was somewhat prepared for that type of testimony. My language and attitude surprised the cop and the judge. The cop was no longer smiling. I was found innocent.