In chapter 7 of the Lalitavistara it is all about the baby Buddha’s birth, but some scholars have said it was not Gotama who inhabited the body at the time but a celestial entity. Can anyone elaborate? Here is a link to the Sanskrit, I am very good with pali and Sanskrit but this one is a bit difficult to decipher:https://www.wisdomlib.org/buddhism/book/lalitavistara-sutra-sanskrit/d/doc686734.html
Since this is a Mahayana text, it falls outside of the expertise of this forum. So you might not get many answers.
O ye of so little faith!
The descent of the bodhisattva into his mother’s womb takes place in Chapter 6. It draws from older source material found in EBTs like the second half of the Mahavadana Sutta (DN 14) and developed it into an epic narrative.
The final life of a bodhisattva before descending back to earth is spent in the Tusita Heaven. So, it is true that he is a divinity when he passes away there. However, it is not a divinity who descends into his mother’s womb. He begins a new life as a human on earth at that point. Exactly what and how his descent into her womb takes place is a matter of controversy among the various Buddhist traditions. Some say consciousness enters her womb, some have different labels for a spirit of sorts, some insist there is no actual transfer other than karma, etc.
There’s a nice translation from the Tibetan found here: The Play in Full | 84000 Translating the Words of the Buddha
It will be very similar to the Sanskrit, perhaps a little more elaborate.
Asking “what inhabited the body of baby Buddha” is like asking “what was Zeus’s molecular structure when he turned into a swan”—it’s a category error to begin with.
This kind of question belongs to the realm of hagiographical convention. These “visions” and “miracles” are cross-cultural religious literary tropes—you find them in ancient India, ancient Greece, and ancient China alike. Their function isn’t to record history, but to construct authority.
The early Buddhist sangha couldn’t have cared less about the “factuality” of these miracles. What they cared about was: “How much patronage can these stories bring in?”
The second-century scribes already buried an Easter egg in the text: acintyo hi sa sattvaḥ—“this being is inconceivable.” In plain English: “Don’t ask. I made it up. Just believe it and move on.”