No, this is not possible; the law does not allow it.
The deposit is a sum blocked for the duration of your contract. Under no circumstances can it be used to pay rent, even the last rent.
đ Why?
The deposit is used to cover any repair costs, unpaid bills or losses noted during the exit inventory of fixtures. It is therefore independent of the rent payment.
To avoid any worries, make sure you pay your rent in full until the end of your contract.
The deposit will then be refunded in full or in part, depending on the condition of the property and your situation. To make sure you get the full amount back, it's important to follow the check-out instructions and return your room in the same condition as when you moved in.