Unless your boss tells you “I don’t care what you think; I’m telling you to prosecute the case”. It’s not like ‘Prosecutor’ is always a single person with absolute authority to determine the course of cases.
So yeah, I’m sure there’s somewhere an ADA or whatever who has had to work on prosecuting someone who they were convinced was innocent. And even in the best case, where a lead attorney did have a good enough relationship with their boss, and little enough political pressure, that they could pull the plug on a case even at the last minute after the office has invested a lot of work in it, I’m sure someone has had second thoughts after the conviction, but not enough evidence or political pull to get the case revisited.
It doesn’t work like that. Prosecutors are independent to the extent that they can drop charges regardless of what the boss wants. Their job is to bring people to justice, not to obtain convictions.
I’ve moved from defending to prosecuting in the last couple of years, but a lot of the stressors are similar if not the same, particularly as regards the facts of a particular case. Dealing with the facts is usually an academic experience, until you realize that the facts of a particularly heinous case of crimes against children has gotten under your skin much more deeply than usual, such that you’re dealing with it by biting the head off of anyone who looks at you the wrong way and by periodically losing your shit on your friends and family.