The buyer was in breach and did not secure their loan, apply and get approval from the HOA, but the escrow agent holding the deposit is stating the buyer must agree to releasing the funds.
Hollywood, FL
You need to hire a lawyer at this point to review the contract and see what your remedies are. The escrow agent cannot just give you the funds. If there is a dispure then either 1) escrow agent asks FREC for an EDO order where the Florida Real Estate Commission will decide who gets the deposit; or 2) the escrow agent files a lawsuit and places the funds in the court and you and buyer fight it out (after escrow agent gets paid back their costs/fees to file).
No way to say without first reviewing the contract documents. The refund of EMD can be a tricky topic that depends upon a variety of facts. Consult with a real estate attorney in the Hollywood, FL area.