There are two places in the Fourth Gospel (in the Authorized Version) where Jesus is quoted as saying "sin no more":
After healing the man by the pool at Bethesda:
5: [10] The Jews therefore said unto him that was cured, It is the sabbath day: it is not lawful for thee to carry thy bed.
[11] He answered them, He that made me whole, the same said unto me, Take up thy bed, and walk.
[12] Then asked they him, What man is that which said unto thee, Take up thy bed, and walk?
[13] And he that was healed wist not who it was: for Jesus had conveyed himself away, a multitude being in that place.
[14] Afterward Jesus findeth him in the temple, and said unto him, Behold, thou art made whole: sin no more, lest a worse thing come unto thee.
[15] The man departed, and told the Jews that it was Jesus, which had made him whole.
Following the episode of the woman taken in adultery:
8: [9] And they which heard it, being convicted by their own conscience, went out one by one, beginning at the eldest, even unto the last: and Jesus was left alone, and the woman standing in the midst.
[10] When Jesus had lifted up himself, and saw none but the woman, he said unto her, Woman, where are those thine accusers? hath no man condemned thee?
[11] She said, No man, Lord. And Jesus said unto her, Neither do I condemn thee: go, and sin no more.
[12] Then spake Jesus again unto them, saying, I am the light of the world: he that followeth me shall not walk in darkness, but shall have the light of life.
The problem is that - as a straightforward order given to any human being - "sin no more" is impossible, hence nonsense; because the very essence of Jesus's teaching is that all Men are sinners and no Men can cease from sinning. Which is a major reason why the incarnation and work of Jesus is necessary.
So the alternative is to finesse the statements into something specific, that might be true.
But there is no context that the man beside the pool in Chapter 5 has sinned as a cause of his infirmity, so that "sin no more" seems irrelevant, as well as impossible. Furthermore, when Jesus is quoted as uttering the following "lest a worse thing come unto thee"... well, to my eye this threat identifies the sentence as a later and false interpolation. And, indeed, the entirety of verse 14 can be deleted without loss of continuity.
What of the usage in Chapter 8? Well, here again the phrase "go, and sin no more" can comfortably be deleted; and this deletion also avoids the contradiction between "neither do I condemn thee" and "sin no more".
On this internal evidence; I regard the phrase" "sin no more" as alien to the Fourth Gospel, alien to Jesus's teaching; and thus presumably a later addition by some other hand.