Do true polymorphed gold dragons retain their ability to cast spells?

I recently rewatched Mr. Rhexx’s video on gold dragons and he mentioned that they love to practice magic. He also mentioned that all dragons can innately cast spells but gold dragons choose to further their magic prowess. Now true polymorph states that whilst morphed you can’t cast spells unless your new form is capable of such. Now spell casting actually isn’t present in the 5e gold dragon stat block so my question is if a mage was true polymorphed into a gold dragon would they still be able to cast spells?