I remember a verdict proposed years ago but never used that I know of.
“GUILTY BUT INSANE.”
Indiana had that at one time. Don’t know if it is still on the books, but it was back in the 80’s. If you were found not guilty by reason of insanity you were incarcerated in a mental hospital for the duration of the sentence or until you were judged to be sane enough to go to an actual prison.