The acquisition and loss of EU citizenship is regulated by EU law, not UK law. If it so wished, the EU can allow former EU citizens by link to the UK to retain EU citizenship. Indeed, the EU Parliament Rapporteur for the Brexit negotiations,
Guy Vefhofstadt, suggested as much at the start of EU negotiations.
However, it may be difficult in practice. EU citizenship is created by the EU Treaties, which require unanimous approval of all existing EU states for any changes. And if the treaties are reopened, then everything in it (not just the proposal for EU citizenship) is up for negotiations. So, in the current febrile political environment in the EU (EU vs Visegard countries, Catalonia/Spain, AfD in Germany, etc), I highly doubt that the treaties will be opened up for renegotiations.
What may happen is that EU citizens living in the UK and UK citizens living in the UK on Brexit day (or an alternative specified date) may acquire specified rights under the terms of the exit agreement/treaty. But that is unlikely to equate to full EU citizenship.
You can retain EU citizenship by acquiring the citizenship of another EU country. As a current EU citizen, you can move to another EEA country under freedom of movement and by staying there, you may acquire any rights granted by the Exit Treaty. You could then (possibly) acquire PR followed by full citizenship of that country.
Also see
this thread for other options.
I am not a lawyer or immigration advisor. My statements/comments do not constitute legal advice. E&OE. Please do not PM me for advice.