Your experience is one of the issues that I educate my buyer clients on so that they can be prepared.
As mentioned if you want to prevent or reduce the changes of your experience from happening in the future you should:
1) make a highly competitive offer - the market is changing as there is a shortage of inventory where multiple buyers are bidding for the same home
2) move expeditiously with meeting with your attorney to sign the contract to get the process moving along and secure a fully executed contract.
Most attorneys do not charge a fee until the day of closing so you might want to look for someone else for the next time around. As a matter of fact as mentioned below, the buyer's attorney is not the one to initiate a contract, it's prepared by the sellers attorney so I don't understand a fee, unless it's for a prior consultation.
Note, you do not have a fully executed contract until all parties sign the contract. Sellers can accept a higher offer and change their mind about accepting your offer and as a buyer you can change your mind also and walk away; it works both ways . As Christopher Pagli mentioned below, unless both buyer and seller signed the "Sales Agreement" (offer) which is actually legally binding, no one is protected.
If I can be of further assistance, please let me know.
Janet Nation, CBR
Sailing Home Realty
Licensed Real Estate Salesperson