The 5e Sage Advice clarified that there is Magic(spellcasting, spell like abilities, magical powers, etc.) and magic(background magic that infuses everything). The latter isn't subject to anti-magic spheres and is what allows those things to happen.
"You might be thinking, “Dragons seem pretty...