According to https://en.m.wikipedia.org/wiki/Tibbetibaba
Tibbati Baba made his soul to permanently or temporarily enter into another human body. According to Hinduism any living human being soul can enter the body of another living or dead human being. This fact is supported by Swami Vivekananda in his book - 'Raj-Yoga or Conquering The Internal Nature'. This can be done when one meditates on the body which is to be entered.
There are two views about Tibbetibaba's parakayapravesha. The first one states that when after wandering for many years, he found that his body has grown weak; he decided to enter his soul into the body of a Tibetan Buddhist monk. The Tibetan Buddhist monk (Lama) had just entered into the state of Parinirvana.
After getting the new body (the body of the Lama) he resumed his wanderings and began making disciples.
According to another view, On his second visit to Myanmar, with the permission of the King and Queen of Myanmar, who were his great devotees, he transmigrated his soul into the body of the dead prince of Myanmar. This was done because his original body had grown weak and feeble on account of old age.
Another known saint said to have achieved the feat is Adi Shankara. He did it when Ubhaya Bharati, the wife of Mandana Mishra, challenged him to have a debate on the "science of sex-love". So to learn the practical aspects of love-making, he entered his soul into the body of a dead king for period of one month. Consequently, Ubhaya Bharati was forced to accept defeat.
But all biographies of Sri Adi Sanakara do not accept this incident.