Jacob Nelson (LDS) in his The Seven Stages of Life to Exaltation argues that 3 Nephi 1:13-14 does not teach the spirit does not enter the body until birth but that the spirit is not locked into the body until birth:
Is
the spirit locked into the body before it is born? The short answer is ‘NO’. An
example of this includes Christ speaking to the Nephites before he was
born yet while his body was in the womb. In the above example, the
Nephites (a group of descendants of the patriarch Joseph—being the same Joseph who
was in Egypt), were having problems with a portion of their people. Signs had
been given that the birth of Christ would be imminent, but His birth up to that
point had not happened. The unbelievers decided on a specific day to put to
death all those that believed . . . If the prophecies of one Samuel the
Lamanite had not come to pass by that time. Nephi, the prophet of that time,
prayed to our Lord to help him. The Lord himself replied to Nephi with these
words:
“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 form 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.” (3 Nephi 1:13-14)
As
you can read from the scriptures above, the yet unborn, but in the womb, Christ,
was able to visit the prophet in the Americas and speak words of encouragement
to Nephi. This clearly indicates that spirits are not locked into their bodies before
birth. (Jacob Nelson, The Seven Stages of Life to Exaltation: Our Path to
Perfection [Lulu Press, 2022], 67-68)