Who submits the person for commitment?
That would be the court’s decision based on the testimony of the accused and the mental health professional. But at least it is due process. And according to settled law, there must be a compelling reason to deny someone their rights.