Life is a one lap race. Make many pitstops.
Earnest money is given as a guarantee that you will complete the sale. Only if the seller backs out of the sale is the buyer due their earnest money refunded. Evidently you were the party that backed out of the sale.