Both sides losing rag going back to prison (4)
I believe the answer is:
gaol
'to prison' is the definition.
(I've seen this before)
I can't explain the remainder of the clue.
Can you help me to learn more?
(Other definitions for gaol that I've seen before include "Nick" , "See 1" , "Prison (British spelling)" , "The Ballad of Reading -- (Wilde)" , "Alternative to jail" .)