There's one thought experiment along these lines that I find compelling.
It requires a couple assumptions (but then again, all thoughts along this line do)
The main assumption in this case is that there is some very small unit of your brain that can be replaced with an artificial analog. Call it an artificial neuron.
Imagine that a tiny but of your brain can be replaced with an artificial part. Let's say we replace 1 out of our 100 billion neurons with a tiny nanocomputer. Let's say it's been precisely engineered to interact with it's fellow neurons in a way that's functionally indistinguishable from the original and preserves whatever state of the original is relevant for memories, meaningful levels of info, etc (I know, what a meaningful level of info is would be its own question).
I think few people would say you're no longer 'you' or that you've lost your consciousness or continuous experience after such an operation.
What's the number of neurons we could replace in one go that would preserve the "you"? Just that one out of 100 billion? How about two? Ten? A million or so? Wherever you draw the line, as long as it's not zero, let's say we replace that number and let you heal up.
If you're still 100% you, 100% continuous experience, now with .01% artificial neurons, who's to say we can't have another operation changing out more neurons as soon as you've healed from this one? Forget for the moment practical concerns of healing time or whatever, that's not what this thought experiment is testing. Can we do another .01% Is there some cumulative effect that enough changeovers that individually preserve the self somehow lose it when you've had too many?
Many (most?) of us might say that removing the brain entirely in one go and plopping in an artifical copy made of 100% artifical neurons would be more or less a death. But it's a bit harder to see why that would be so if the replacement were bit by bit and the continuity of our experience were the same as it is around normal surgery anaesthesia or sleep.