Technically speaking, rental deposit is different from the rent. The aim of the rental deposit is for setting off any charges that the landlord can claim on the tenant on surrendering the premises upon the termination of the tenancy agreement. The setting off of the rental deposit for the last month's rent is purely an agreement with the landlord as requested by the tenant. You could check there is no such auto-setting off mechanism of the rental deposit to rent in any tenancy agreement.