It depends to a large extent on the interpretation of DM.
"Personality" is not a game term per se. It retains the ordinary meaning of that word and is adjudicated by the individual DMs in case a question arises.
The closest to a definition is in PHB p. 123, Personal characteristics, What states:
Examining the personality of your characterThe variety of traits, manners, habits, beliefs and failures that give a person a unique identity.It will help you to give life while you play. Here four categories of characteristics are presented: personality traits, ideals, links and failures. Beyond those categories, think about those of your character. Favorite words or phrases, habitual tics and gestures, vices and manias.Y anything else you can imagine.
The last part is important, because it states that almost anything, apart from game statistics or physical features, could be considered part of a character's personality.
The text of true polymorph define how a character changes when affected by that spell:
The statistics of the target game, including mental ability scores, are replaced by statistics of the new form. It retains its alignment and personality.
… The creature is limited in the actions it can perform by the nature of its new form, and can not speak, cast spells or perform any other action that requires hands or speech unless its new form is capable of such Actions. .
The spell does not say that you lose your memories (only your mental ability score), so there is no reason for you to forget things you knew or things you knew to do. You are still you in all non-physical ways, but the brain of the new form can limit you. Think of the episode of Quantum Leap in which Sam jumps into the body of a man with a mental disability and discovers that his mental faculties are also affected.
I would also interpret that the last line of the previous quote means that the physical form is what limits its actions. A polymorphized human in a dog does not forget how to use a sword, only their hands are missing.
In summary, at least as I interpret it, your DM can interpret it in another way:
- Any game statistics from the old way they are replaced
- your state of mind it is retained (with the exception of mental ability scores), so that it retains all its old knowledge, personality, memory, etc.
- You lose things that you no longer have the physicality to do.
- For things on the borderline between personality and game statistics (for example, skills), it depends on the DM. Polymorphous organism at least it was absurdly complicated in D & D 3rd Edition as well, and we will not see a stricter definition of what you gain and lose while polymorphized unless you want the description of the spell to be a full page.