Much depends upon what your commercial lease says.
Generally speaking, the landlord can lease the space to a new tenant if you vacated to mitigate the landlord's damages for your breach of the lease.
California Civil Code section 1950.7 governs treatment of security deposits in commercial leases.
Basically, California law says that security deposits in commercial leases must be returned to the tenant within thirty (30) days after the landlord receives possession of the premises, unless they are applied by the landlord to remedy tenant defaults in the payment of rent, to repair damages or to clean the premises.
Unlike a residential lease situation where the new owner as the landlord's successor in interest is "jointly and severally" liable for repayment of the security deposit (Civil Code section 1950.5(j), California Civil Code section 1950.7 provides as follows:
"(d) Upon termination of the landlord's interest in the unit in question, whether by sale, assignment, death, appointment of receiver or otherwise, the landlord or the landlord's agent shall, within a reasonable time, do one of the following acts, either of which shall relieve the landlord of further liability with respect to the payment or deposit:
(1) Transfer the portion of the payment or deposit remaining after any lawful deductions made under subdivision (c) to the landlord's successor in interest, and thereafter notify the tenant by personal delivery or certified mail of the transfer, of any claims made against the payment or deposit, and of the transferee's name and address. If the notice to the tenant is made by personal delivery, the tenant shall acknowledge receipt of the notice and sign his or her name on the landlord's copy of the notice.
(2) Return the portion of the payment or deposit remaining after any lawful deductions made under subdivision (c) to the tenant.
(e) Upon receipt of any portion of the payment or deposit under paragraph (1) of subdivision (d), the transferee shall have all of the rights and obligations of a landlord holding the payment or deposit with respect to the payment or deposit.
(f) The bad faith retention by a landlord or transferee of a payment or deposit or any portion thereof, in violation of this section, may subject the landlord or the transferee to damages not to exceed two hundred dollars ($200), in addition to any actual damages."
Frank W. Chen has been licensed to practice law in California since 1988. The information presented here is general in nature and is not intended, nor should be construed, as legal advice for a particular case. This posting does not create any attorney-client relationship with the author. For specific advice about your particular situation, consult with your own attorney.
Under the circumstances you describe, the landlord may be able to apply the security deposit to the unpaid balance of rent for the remaining term. The fact that there is a new tenant who was in the unit only a few days after you left may be a good reason for the landlord paying you back the entire deposit. However, a landlord is entitled to apply deposit money to unpaid rent, and is only obligated to use his best efforts to find a new tenant as fast as possible.
The landlord will probably claim that he could not find a suitable tenant, and that the one he finally rented to, would only pay rent starting May 1.