Insanity is foreign to psychiatry. Psychiatry, like all of medicine, is an empirical technology. The premise of empiricism is that the universe exists as it is, and the task of scientists and other empiricists is to discover facts about it. By contrast, the law is a product of idealism. The premise of idealism is that there are ways the universe ought to be, and the task of the idealists is to invent ways of achieving that.
Insanity is an invention of idealists.
It is not a discovery of empiricists. Hence, the idea of insanity is a creature of imagination, not of nature. It is a unicorn, having any properties that people wish to give it. As a unicorn, it is not available to be studied by empiricists. So, as a myth, insanity is alien to psychiatric science.