The verdict of the jury must be entered upon the minutes, and thereupon the court must make and cause to be entered an order reciting the fact of such inquiry and the result thereof, and when it is found that the defendant is insane, the order must direct that he be taken to a medical facility of the Department of Corrections, and there kept in safe confinement until his reason is restored.