Depends on the situation. Got a great story about this,
I lived with my ex for 6 months with the understanding that I was going to be living abroad for 6 months for the second half of the lease. The rent was about £105 a week so a lot for one student to cover but this was what we had agreed and he was insistent that he didnt want to have housemates.
I broke up with him because he wouldn’t come visit me and wanted to go on holiday with his friends instead, and wouldn’t download skype or buy a webcam/microphone or whatever so we basically stopped talking (plus loads of other things to do with his general selfishness and immaturity).
anyway, he took it really badly and guilt tripped me into giving him several hundred pounds to cover some of the rent from when I hadn’t been living there, saying his dad had told him that he’d been had or some shit. just gave him it cause I wanted to make clear I would never do something like that and it was entirely his own shitty behaviour that made me leave him. even though I’d been paying all of my own rent in my other place for the 6 months when we’d agreed we wouldnt be living together… anyway, don’t just hand over money cause you feel bad.
In the situation you’re describing I think there would be an expectation that both pay something if that’s what the original arrangement was. but it really depends on your relationship and what you can both afford, why the relationship has ended etc.