First the problem.
There is a ship, and its owner replaces one piece every day. Eventually not a single one of the original parts remains. Is it the same ship?
That's the 'Ship of Theseus' problem.
The answer is: Yes. It is the same ship.
Objects are causal series, i.e. they are series of events whose earlier members generate their later members.
Same series, same object.
As long as the causal series is preserved, the object is preserved. Sometimes preserving the causal series involves losing parts, sometimes it involves retaining them.