Suppose a 5th-level human wizard (let's call her Morgan) is subject to true polymorph, and the spell becomes permanent. While polymorphed, Morgan remains with the party and contributes to adventures. Does she get experience points? When the party, now all 15th level (having each gained around 160,000 experience points), can finally manage to dispel the true polymorph, what level is Morgan?
This might depend on what Morgan was polymorphed into. Here are some possibilities:
Morgan is a Giant Scorpion. She has an Intelligence score of 1, doesn't have anything resembling a bipedal body, and doesn't have opposable thumbs or any kind of speech organs.
Morgan is a Xorn. She has an Intelligence of 11, but is now a completely alien elemental being.
Morgan is a Minotaur. She has an Intelligence of 6, but can handle weapons and fight with them. Minotaurs could gain levels as (say) barbarians or fighters.
Morgan is a Lamia. She has an Intelligence of 14 and has inherent spellcasting abilities, but although she can assume a human form, she isn't human.
There are two aspects to consider. First, can Morgan improve while she's polymorphed?
If Morgan has a form that can't speak, hold things, and isn't intelligent enough to learn, can it improve in any way? If Morgan has a form that's not organic and doesn't age or get stronger, can her hit points and attributes improve? If Morgan has a form that's a member of a different class, where do the XP she earns go? And if Morgan has a form that can cast some spells, can she somehow leverage that to improve as a wizard, or to improve her form's innate spellcasting?
Second, what happens when Morgan is returned to her normal form?
If Morgan had an Intelligence of 1 while she was polymorphed, can she have improved as a wizard during that time? If Morgan was a member of another class for that time, does the experience somehow "transfer" to her Wizard levels?