Law breakers are tried on what they have done, not on what they remember!😟
That being the case, every criminal would have very short memories!🤔
Lacking the mental competence to stand trial is a valid legal claim under the law and has been for a very long time.
The defense does have to prove it though.