The Monster Manual contains guidance for Player Characters as Lycanthropes (p. 207) or Vampires (p. 295).
Is there general guidance on how to handle player characters (semi)permanently transforming into another creature where they could retain their class levels and statistics but also take on characteristics of that creature?
Possible examples I am thinking of might be a transformation into a lich, a dragon, a fiend/celestial, etc.
I am specifically looking for solutions where the character can still function as a PC, gaining EXP, levels, and interacting with other player mechanics.
I am looking for answers based on official content, however, if there is no useful rules/guidance in DnD 5e, I would be interested in how other editions handled this idea or even DM/player table experience and solutions.