As a franchise, Star Wars has long been interested in ideas surrounding immortality. The inclusion of Force Ghosts in the original trilogy implied Jedi could live on after death as immortal spirits. This seemed to suggest that spiritual immortality was possible within the franchise. When any Jedi dies, they become one with the Force, their identity merging with the spiritual Living Force - which sustains all life in the galaxy - upon their death. However, this was not true immortality, as joining with the Living Force would cause a being to lose their individual identity. Only a select few Jedi - among them Yoda, Qui-Gon Jinn, and Anakin Skywalker - could manifest as individual Force Ghosts and communicate with physical beings directly. Even these characters only appear occasionally as ghosts, limiting the usefulness of their "immortality".
Source:https://www.cbr.com/star-wars-clones-force-ghosts-carbon-freezing-immortality-explained/