When the property changes hands, the account goes into the new lease holder's name; however, the financials are negotiated during the sale of the property between the vendors and the buyers' solicitors.
It is important to discuss this with the solicitors involved with the sale as they may have produced a retention pot, which are funds put aside for this.