Technically, that's already the law, at least in Florida.
When the Prosecution rests its case, the Defense routinely moves for a Judgment of Acquittal which asks the judge to rule that (even in the light most favorable to the State) the Prosecution still failed to meet its burden of proof for all the elements of the crime. These usually only succeed on a technicality where the Prosecution forgot something basic, like to ID the Defendant, establish venue, or there's some particular element whose box went unchecked.
Relevant here, the JOA decision cannot consider the Defendant's own statements in the judge's decision. In other words, if the Defendant confessed but the Prosecution failed to establish a case without that confession, the JOA is granted and the case is dismissed. The confession is considered by the jury, if it reaches the jury, but only if the JOA process determines that (even without the confession) there is enough evidence to proceed to verdict.
When the Prosecution rests its case, the Defense routinely moves for a Judgment of Acquittal which asks the judge to rule that (even in the light most favorable to the State) the Prosecution still failed to meet its burden of proof for all the elements of the crime. These usually only succeed on a technicality where the Prosecution forgot something basic, like to ID the Defendant, establish venue, or there's some particular element whose box went unchecked.
Relevant here, the JOA decision cannot consider the Defendant's own statements in the judge's decision. In other words, if the Defendant confessed but the Prosecution failed to establish a case without that confession, the JOA is granted and the case is dismissed. The confession is considered by the jury, if it reaches the jury, but only if the JOA process determines that (even without the confession) there is enough evidence to proceed to verdict.