According to Nephi, son of Nephi, son of Helaman, Jesus spoke to him the night before he was born.
3 Nephi 1:13-14
Lift up your head and be of good cheer; for behold, the time is at hand, and on this night shall the sign be given, and on the morrow come I into the world, to show unto the world that I will fulfil all that which I have caused to be spoken by the mouth of my holy prophets. Behold, I come unto my own, to fulfil all things which I have made known unto the children of men from the foundation of the world, and to do the will, both of the Father and of the Son—of the Father because of me, and of the Son because of my flesh. And behold, the time is at hand, and this night shall the sign be given
At this point in time, Mary was 9 months pregnant with Jesus and ready to pop. That night, the sign was given to the Nephites of the birth of Jesus. So according to the Book of Mormon, Jesus' spirit had not entered into the world at this point, since his spirit had appeared to Nephi. It would be reasonable to conclude that according to the Book of Mormon, the spirit enters the body at birth, and not a moment earlier.