jimmy, the reason you will get your earnest money back is because this landmark case with a similar fact pattern to what you describe here set a precedent in CA in favor of the “buyers” who ended up actually selling their own home while in escrow to buy another home, thinking they were going to move into a home that the sellers had no authority to convey to them.
It is cited as Holmes v. Summer (2010) 188 Cal.App.4th 1510 and is still good law.
Wait until one day after your rate lock expires and then formally ask for your earnest money check back. If seller’s agent hassles your agent over this, cite this case to his/her broker in a letter and you will get your check back, forthwith.