The defendant may move the court for a judgment of acquittal on the grounds of insanity: PROVIDED, That a defendant so acquitted may not later contest the validity of his or her detention on the grounds that he or she did not commit the acts charged. At the hearing upon the motion the defendant shall have the burden of proving by a preponderance of the evidence that he or she was insane at the time of the offense or offenses with which he or she is charged. If the court finds that the defendant should be acquitted by reason of insanity, it shall enter specific findings in substantially the same form as set forth in RCW
10.77.040. If the motion is denied, the question may be submitted to the trier of fact in the same manner as other issues of fact.