Those who have ascertained the meaning of the knowledge of Vedanta, ascetics of purified nature through the yoga of renunciation—all of them, in the worlds of Brahman, at the final end, are wholly liberated into the supreme immortal.
The sages, united with pure reason, renounce the results of their actions and, liberated from the cycle of birth, they attain a state of bliss.
So long as this soul does not know its real destination while dwelling in the body, it is not going to be liberated from the cycle of births and deaths. There is only one way to get rid of this wandering and that is to realise God while the human body is still there.