Yes, but the tenant must indeed be responsible for the damages.
You can’t just decide to withhold the deposit. It’s very important that a good pre- and final inspection take place, because the law states that a tenant must have been given the oppertunity to repair said damages. Should the tenant not have used this oppertunity, a landlord can arrange for repairs or perform the repairs themselves. Those costs may be withheld from the deposit.
It’s important to mention that any invoices or receipts can be handed over to tenant, to ensure full transparancy.