This is actually an interesting question. The critical problems are the definition of “insanity” and the criteria for “creativity”. It is almost axiomatic that people with mental disorders do not process information and experience in normal ways. Their alterations in information processing might lead to creative results. This situation has been documented extensively. Further, you need to ask who is assigning the label of “insanity”. Very creative people see things very creatively. Those who do not have such creativity may consider the thinking anomalous or “insane”. This is more of a comment on the evaluator than on the creative person.
So, with these kinds of considerations in mind there is some foundation for saying that “insane” people might be creative - at least at times. For example, when I took my neurology boards (which was 1/3 psychiatry) I was asked to evaluate a patient with bipolar disorder who, during his periods of mania, was a very successful Hollywood creator. However, his periods of depression tended to destroy his career. We no longer tend to use the pejorative word “insane” for patients with bipolar disorder. However, during mania they can see things in very distorted fashions.
Img source: https://www.yourquote.in/miran-ishaq-emnp/quotes/poets-insane-creative-insane-cls97/