We don't experience the future, which means our sense of continuity can only be a result of something in the present and/or the past. That isn't violated by teleportation or duplication. When two copies step out of a duplicating teleporter, they are both a continuance of the same person. The "original" Riker is the original in the same sense as you exactly one moment ago are the origin of you in this moment.
[1]: https://en.wikipedia.org/wiki/Second_Chances_(Star_Trek:_The...
Even if every cell in your body is replaced over a 7 years period which they don’t since not all cells actually undergo mitosis or are even replaced through stem cells not every molecule in your body needs to be replaced for that to happen and in fact it doesn’t it would be exceedingly wasteful and impractical.
So the many if not most hydrogen molecules you were born with are still probably somewhere in your body.
I don't recall the episode name off-hand, or want to give away too much of the plot, but I thought that was better than the duplicate Rikers.
Also: two Crichtons in Farscape, although that wasn't due to a transporter-like accident but a "normal" clone.
I remembet having read it when it was first published in Asimov's SF magazine. God I'm old.
What if the transporter malfunction causes the same for riker, except both rikers now travel forward in time right from the start. Therefore, they are both one and the same original riker, but they inhabit the same points in time at different points in space and therefore they will diverge as soon as they exit the transporter.
Therefore neither are the original Riker, which was evidently terminated in the most horrifying fashion the first time it stepped into a transporter beam.