The adversarial trial format process assumes (hopes) that:
1. Both sides have competent lawyers that are doing the same thing
2. The judge prevents lawyers from going outside the rules
3. The jury is competent and is putting forth an honest effort
4. If misconduct is discovered after the fact there are avenues to a retrial (appeal, etc)
We can look at many times where this system went horribly wrong. However I think it's fairly close to the best that can be hoped for. When all parties are competent and well-intentioned (not always the case, sadly) it is probably one of the strongest links in the legal system.
You have very little recourse, even if you possess overwhelming evidence of misconduct. Appeals are, at best, very slow, and there is a good chance that you will be spending that time in jail -- during which time it is hard to prepare for your defense.
And there is practically no penalty for a prosecutor who engages in misconduct. They hold immunity stronger even that that of police. There is effectively zero constraint on them to be honest. Many do it anyway -- they are not, for the post part, monsters. But if you encounter one who is, your rights were effectively forfeit the minute you walked in the door.