Instantly ctrl-f'd to see if anyone would mention transporters. I believe in some circles this has been dubbed "The Transporter Problem". It's a thought experiment that already exists.
Invincible also tackled this problem, with someone cloning a new body, and copying his brain to a new body. For a brief moment both bodies perceive the same thing before their experiences split into the two bodies. The copy wakes up, says goodbye to the original, who is dying, and says "I'm sorry it wasn't you."
This is also IMO related to the ship of theseus problem. Are you the same person you were 20 years ago? Are you the same person in the morning as the person who went to sleep? Are you the same person as a minute ago? What if you add in concussions/memory loss/degenerative disease?
Star Trek's lore includes some technobabble about transporters operating in "quantum" mode to assuage concerns that the person at the transporter destination is not the same as at the source.
There was an episode with a transporter accident, but the energy/essence ("soul") still remained and could be transferred to a backup copy. This implies that the energy/soul is also transported.