All depends how the property is left and the circumstances, at the end of the day the final say lies with the Landlord. We can't hold onto a deposit forever but nor can we give it out without a go ahead.
As an agent, if we manage the property we try and meet the tenant at the property to see them out. We check the inventory, note down any changes and take the keys. The landlord is then updated and sometimes they are fine with us saying it's ok on their behalf and we release the deposit. Some landlords are more picky and want to go and inspect it themselves.
Now that the deposit protection is around, we can withhold a certain amount for damages and return the remainder to the tenant, at the same time informing them why an amount has been held. They either agree with this and job done or they don't and they contest it, in which case it goes to the scheme along with the evidence (photos, receipts, statements from LL and tenant).
All letting agents should take a deposit, if they don't then you need to find another agent tbh. Our deposits are noted in the agreement and obviously these days every deposit has to be protected so you should get a certificate proving that when you move in.