This game is actually a bit before my time since it was released two years before I was born, but the original XCOM game (aka UFO: Enemy Unknown) is still one of my favorite games of all time. And it's just gotten better over the years with fixes and modding through OpenXcom.
I like the modern Firaxis games a lot too, and Xenonauts even moreso, but nothing has quite hit the same as the OG.
There's actually a book series I enjoy, the Bobiverse series, that does an interesting take on it. In it a human, the eponymous Bob, gets digitized and becomes the AI of a Von Neumann probe. He's given the mission to make copies of himself, explore the galaxy, and build colonies for humanity.
Later on in the series...
As he makes more copies of himself, it's found that the personality of the copies diverge more and more the farther from the original that they descend, and they eventually devise a statistical way to measure this divergence. No two extant Bobs are ever the same person, even though they're identical copies.However, it's also discovered that if a Bob makes copy of himself, shuts down his original AI matrix, and only then the copy is turned on, that Bob will have no measurable divergence from the one he was cloned from. It's measurably the exact same individual, and it implies that in-universe there's some fundamental, tranferable property of identy. Arguably some kind of "soul".
Not only that, if the original AI matrix is turned back on then that one starts displaying the divergence that was expected of the copy. This is used in one case to transmit the data of a Bob to a waiting, empty AI matrix around another star to avoid physical travel and side step the teleporter problem.
There's a lot of sci-fi hand waving in it, but I thought it was a fun way to approach the question.