Yep, for example, lots of cases with coerced confessions or just confessions obtained from individuals with developmental disabilities. The investigator would be the one who overdid it, not the prosecutor, who is often obliged to pursue the case if someone says they did the crime. Whether the confession is any good is up to the justice system. This applies to many semisciences or pseudoscience or expert witnesses or shoddy statistics. The prosecutor should look at the case in good faith [not tunnel vision] and rely on the courts to be fair arbiters. Then you have technical boondoggles like Bill Cosby where the prosecutors view the matters of law one way and eventually the appeals courts view it differently--whether he committed some crimes wasn't really the first order matter.
If the prosecutor is obliged to pursue the case couldn't they still say in court "this confession was coerced, please do not find them guilty"? If they don't, then it seems to me that the prosecutor is just as guilty.
I don't think it would even have to come to that. Don't prosecutors have some discretion? Couldn't they just say that they do not think the case merits prosecution, and walk away?
(And I see the strain between this comment and my previous one. If the prosecutor has discretion, then they have responsibility for how they use it. But the bar for coming after the prosecutor needs to be considerably higher than just a "not guilty" verdict. The prosecutor probably should be more responsible for abusing their discretion than they are. But when the pendulum moves, it often moves too far.)