Case in point: Star Trek's transporters, which pretend to be teleporters but probably just atomize you while building an identical clone somewhere else.
Nah that's because they locked a second "transporter beam" onto the pattern while it was in transit, thus basically making a copy. Normally it's supposed to turn your matter into energy in a specific pattern, then move that energy to another location and turn it into matter again.
Now, in my opinion, in our universe, the end result is the same - your continuous consciousness is interrupted/ended and an identical copy of you is created somewhere else. But we're talking about the star trek universe, where thoughts are apparently at the very basis of physics and can directly influence the universe, especially anything to do with "subspace". So it's safe to say that consciousness exists on an additional, metaphysical layer other than just your corporeal form.
Also, there are multiple cases of people being turned into "pure energy" and retaining their consciousness somehow, so I dont see how a transporter would necessarily be different.
Honestly, Star Trek isn't good enough scifi for me to think too hard about this problem. None of the writers seem to really think about the large implications of transporter and replicator tech. You may get an episode about using the transporter buffers to smuggle refugees, but then the concept wont come back up.
Better examples of world building with replicator tech would be Diamond Age or the Bobiverse books. Both have thought out limitations that prevent casual replication of living animals.