Unfortunately, that doesn't work. Antimagic Field is always centered caster (10-ft-radius emanation, centered on you to quote the PHB). Furthermore, since it is only of ten foot radius, once the dragon grows beyond large size, the field no longer covers him entirely, leaving him vulnerable to spells.