Dementia and the continuity of the person
For a systematic overview of theoretical approaches that link a person's continued existence to psychological connections to the past, see the pertinent description in:
Parfit, D. (1984): Reasons and Persons. Oxford University Press: Oxford, especially 204-209.
Cf. on approaches in which the continuity of persons is determined by physical or neuronal criteria, e.g:
Fuchs, T. (2018): Leiblichkeit und personale Identität in der Demenz. In: Deutsche Zeitschrift für Philosophie 66 (1), 48-61, especially 58. doi: 10.1515/dzph-2018-0005 Online Version (German)
Mc Mahan, J. (2002): The Ethics of Killing. Problems at the Margins of Life. New York: Oxford University Press (Oxford Ethics Series), 66-69.
Cf. for further reading on the question of how the problem of continuity of dementia patients relates to the question of the binding force of their living wills:
Schmidhuber, M. (2013): Überlegungen zu den Grenzen der Patientenverfügung für die Selbstbestimmung von Demenzbetroffenen im Anschluss die Dworkin-Dresser-Debatte. In: Ach, J. S. (Hg.): Grenzen der Selbstbestimmung in der Medizin. Münster: mentis, 317-334, especially 324