to attain lichdom, one has to craft and imbue a special item (phylactery) with all their powers and life.
becoming an undead would come with disadvantages, and destruction of this phylactery would mean death (and loss of all spells imbued in them, perhaps having to relearn those lost . )