A level 20 character can be changed permanently by True Polymorph into an Ancient Brass Dragon (CR 20). Ancient Brass Dragons have the Change Shape action that says,
The dragon magically polymorphs into a humanoid or beast that has a challenge rating no higher than its own, or back into its true form. It reverts to its true form if it dies. Any equipment it is wearing or carrying is absorbed or borne by the new form (the dragon's choice).
I'm unclear if challenge rating could refer to total character level of a specific character, but if it does, could this dragon change into it's original body?