If you are a level 20 Wizard who is True Polymorphed into an Ancient Brass Dragon, can you then use the Dragon's Change Shape ability to turn back into a level 20 Wizard, maintaining all your class abilities, but also gaining the dragon's hit points, and various other statistics listed in the text of Change Shape?
No, you can't do this. Change Shape lets a dragon turn into "a humanoid or beast that has a challenge rating no higher than its own".
A level 20 wizard doesn't have a challenge rating. You could turn into the CR 12 Archmage, if you wanted, but you couldn't become any player character, because player characters don't have challenge ratings.
When you are a level 20 Wizard, your challenge rating is likely lower than 20, assuming that you don't possess quite a bit of magical gear (meaning really powerful items). You could have a shot at trying to calculate your CR based on the process described in the Dungeon Master's Guide. However, this seems only valid for turning back as True Polymorph will use your level as players technically have no challenge rating.
Hence, you can turn into a CR 20 or lower Dragon. Taking into account the earlier comment about gear, the CR of your new form may even rise a bit but may very well not. In any case, you will be able to turn back into your old self using the Dragon's innate ability to change its form.
While your game statistics are replaced, you maintain the essence of your self, your level. I even remember there being an official discussion where someone mentioned that a level 20 Wizard polymorphing into a dragon wasn't a big deal as even though the dragon now also was a level 20 Wizard, the challenge rating was pretty much unaffected as the dragon is already quite powerful. However, I cannot seem to find the source (I'd appreciate any tips in the comments). So yes, you can turn into a dragon and still be a high-level wizard. You are now merely a dragon wizard who might have some trouble with those somatic components and their claws.
Turning back using change shape will also not replace your class features in any way. You will however loose your abilities that relied on your dragon form as mentioned by the spell. However, you will not be able to turn into a level 20 wizard, you will need to turn into a humanoid of a given race (you can likely choose whatever you were before though). You will gain average stats for all those that won't get replaced by the dragon's.
Now to answer your question philosophically, you never cease to be a level 20 Wizard. First you are a humanoid (Elf, Human, Halfling, etc) level 20 Wizard. Then you are a level 20 Dragon Wizard. Using Change Shape you will again become a humanoid level 20 Wizard.