That's a little tricky.

The three of you jointly signed a lease with the owner. That makes you all tenants of the owner and it's the owner who would have to comply with the security deposit law and he could be liable to the third tenant if he did not address all three of you in the refund of the deposit. In other words if he wrote the check to the two of he could be liable to the third tenant who was still on the lease until expiration.

You and your roommate did not have a landlord/tenant relationship so the two of you are not bound by the security deposit law.

However, the three of you did have a contract in that you agreed to split rent and expenses until the expiration of the lease. She paid her share of the rent for three months after moving out so she was not in breach until she stopped paying. At that time, contract law requires you to mitigate your damages by finding a replacement as soon as reasonably possible.

You failed to mitigate. Instead you allowed the lease to run out without doing anything. Because of that she owes you nothing from the date of the breach. Since she owes you nothing for that period then you would be wrong to withhold her share of the deposit refund that you have already received and the two of you could be successfully sued for it.

Up to you what you want to do. But if she's making noise about getting her share back you would be wise to give it to her or take your chances that she might sue you for it.