A refundable tenancy deposit is security against claims such as unpaid rent or tenant-caused damage. It is different from rent in advance and from a holding deposit used while arranging a tenancy.
For the private assured tenancy covered here, the landlord must use an approved deposit-protection scheme. In a custodial arrangement, the scheme holds the money. In an insured arrangement, the landlord or agent holds it and pays for protection. A deposit is not necessarily unprotected just because the landlord still holds the cash.
The scheme's records and rules matter. Protection gives a process for returning the money and resolving eligible disputes; it does not promise that every proposed deduction will fail.