I am positive that mine is a short fiction, either a short story or just a shortish novelette, definitely not a novel. I read it many decades ago, probably i nain a collection,. I read very few magazines.
So it cannot be a dupe of:
Looking for a story where a person is threatened with repeated murder
where the accepted answer is the novel "The Ophiuchi Hotline".
nor
which has only "The Ophiuchi Hotline" as an answer, which is not even accepted.
My story, however, does have a strong John Varley "taste". In particular, sex changes are usual. There are, however, so many short fictions by this author, most of which I don't have access to...
In my story, people had regularly made backups of their memories, so if they died, they could be revived by inserting these memories in clones rapidly created from their DNA.
One woman wakes up to find out that not only did she die, but she was murdered, and not just once but several times, and always revived on the same backup, so she doesn't remember the several short lives she lived before each murder.
I don't remember much more, but this time she is better prepared, and when going to the rendez-vousrendezvous her killer has arranged, she finds out that the killer is "herself", but in a male body.
An illegal version of herself was created by criminals for a reason I do not remember. In a world where everyone is recorded, this version would be executed. It has a hard time surviving, hiding "behind the wainscotting" of that society, and wantedwants to kill her to take her place. But she decides to save her male illegal counterpart. I don't remember how it works, but IIRC they somehow escape together to some place where both will be allowed to live.