The Ghost in the Shell films and series explore these ideas in a much more nuanced way than I can fit in a comment. Your comment is more thought-provoking than I can hope to do justice with my own, and your words reminded me of Major Kusanagi’s forlorn acknowledgment of her own cyborg body no longer being her own, but rather being government property. After her body’s service life was over, she might get overhauled as long as she continues to serve Section 9, but after she leaves, what would she even be left with, after the classified technology was exhumed from her body? Who would she even be, if her memory of her life of service were also part of her cyberbrain, and subject to recall or extinguishment upon retirement?