The criminal justice system is intended to be biased in favor of the defendants as innocent until proven guilty. Consequently, if everything were working perfectly, I’d expect prosecutors to only charge people if they were extremely confident that they could prove the person’s guilt beyond a reasonable doubt. Taking cases without solid evidence and regularly losing at trial would be indicative of a major problem.
If prosecutors lost more cases, that would mean they were being even more aggressive in over-prosecuting flimsy cases.