This happened to many people in Maryland a few years ago in the middle of the housing crisis 2005-2007
Understanding that many people had contracts with builders as the prices were going down and down.
In some cases builders went out of business and declared bankruptcy leaving would be homeowners with no house and no deposit to account for.
As you are aware, the deposit, sometimes called escrow/earnest money is a good faith deposit payment to tell the builder you are serious buying a home.
A few year ago, deposits were paid to builders that later filed under the protection of a bankruptcy.
That deposit money was immediately included in the bankruptcy and getting your deposit back was a nightmare.
That is if . .your deposit was paid to the builder directly , you will then MOST LIKELY file a legal action against that builder to recuperate your money.
. .along with all the other creditors.. .good luck on that!
As our client and prospective homeowner we seek in most cases a contractual provisions to protect your rights.
"Not one of our past clients has ever lost their deposit money when buying a home working with us"
One method is putting the money in a third-party escrow account, which it allows the deal to end if no product is rendered . .
Another method is your Real Estate Agent's Broker. They are required to have a separate account to protect their clients deposit and escrows while a transaction is being consummated