Common in The 6th Day. When the villains die throughout the film, they are replaced with a clone, who retains their previous incarnation's memories up until the time of death, making it seem like a resurrection. The protagonist, Adam, is cloned while still alive, so that there are two Adams coexisting each with the exact same memories. It's to the point that the Adam we're following throughout the film, who initially believes himself to be the original, turns out to be the clone.
This isn't an example. It's explicitly stated they take a brain scan of the target and copy the brain patterns. When the bad guy is talking to Adam, he doesn't ask if he remembers "up to the point you died", he asks "do you remember anything between the scan being taken and waking up". The scans can also be taken after death if deterioration hasn't set in.
Coming back to where you started is not the same as never leaving. -Terry Pratchett
This isn't an example. It's explicitly stated they take a brain scan of the target and copy the brain patterns. When the bad guy is talking to Adam, he doesn't ask if he remembers "up to the point you died", he asks "do you remember anything between the scan being taken and waking up". The scans can also be taken after death if deterioration hasn't set in.
Coming back to where you started is not the same as never leaving. -Terry Pratchett