In what ways are high level martial characters better than a high level spellcaster with True Polymorph?


I am a DM running a high-level campaign. My group has recently leveled up to 17, and one of the casters has taken True Polymorph. They have stated their intent to turn into the most powerful kind of dragon allowed by the spell, and use it in combat.

I am worried that the martial classes (Paladin & Rogue) in the party will feel overshadowed by this – after all, with a prep time of 1 action, this caster can turn into an Adult Gold Dragon that almost certainly possesses better mobility, greater or equal damage output, and a health pool twice or more the size of theirs. When that health pool is depleted, they return to “only” a 17th level caster down their 9th level spell slot.

So, I am asking this question to identify the ways in which high level martial characters can excel in their niches in ways that this caster cannot just by turning into a dragon/other high CR creature.

My intent with the answers I get is to implement them: i.e. structure the game such that it is one that supplies a set of challenges that make the martial characters feel useful and powerful, rather than a set that make them feel outclassed by the shapeshifted caster, regret their class choices, and feel like “transitional characters” whose only purpose was to get the casters to level 17.