I have ADHD and finishing my PhD right now. My doctoral supervisor practically gave me free rein and I was able to let my creativity run free. This resulted in a new method in the field of ML that we now even have patented. But let me tell you, everything around it was hell. The teaching was exhausting, the lectures were exhausting and the publishing was exhausting. I'm glad it's over, all those boring tasks are really getting on my nerves and I'm looking forward to working in the industry soon. So if you really consider this, don't rush this decision.
My anxiety became worse after I joined PhD. I started having panic attacks. I am glad I decided to drop out. After dropping out, I found that I had BPD. So turns out I already had mental illness and PhD just made it worse.