Not a lawyer, but I think that evidence of bad faith on the part of the prosecution usually gets a case dismissed with prejudice.
This reminds me of that movie with Katherine Turner movie, ‘Body Heat’.
Her husband died and the will, that William Hurt’s character had filed, had a mistake in it. IIRC, the will was deemed invalid and she got everything - even though the will specified that his sister and niece were to be included. Turns out, IIRC, Katherine’s character had doctored the will so it was invalid and couldn’t be contested since her husband was dead and her attorney was blamed for the error.