In my experience most contracts fall out for 1 of 2 reasons. Either the buyer is unhappy with the inspections or the buyer is unable to secure financing. Either way most contracts (seek legal expertise on your state's contract) provide the Buyer a bonafide way to terminate and receive a refund of their earnest money and not be held liable to the Seller to specifically perform and complete the purchase of the home.
Ways to mitigate the sellers risk:
Work in due diligence to prove you have a bonafide buyer willing and able to financially purchase the home. Whether that be with pre-approval letters, bank proof of funds letter or other means of proof such as increased earnest money amount. The situation is still as such; a letter is only as a good as the paper it is written on. Buyers cannot deliberately cause their loan not to be approved but once again, good luck proving they did it.
Mitigate the length of time the buyer has for inspections. These should be done quickly. Allowing a buyer to have 3 weeks for inspections will result in your home being off the market that amount of time and result in the loss of other potential bonafide buyers if the buyer decides at their sole discretion the inspections are not satisfactory.
Accept back up offers; although very few buyers want to be 2nd it’s always a possibility.
Tighten up as many buyer contingency dates (inspections/loan application/appraisal/etc...) as possible including a closing date.
And, after all reasonable efforts are made to make it difficult for a buyer to back out, guess what; they back out. Welcome to the business. Many sellers feel burned when a buyer rightfully terminates per the contract and the seller has no recourse. However, if a seller goes into a contract with eyes wide open they can limit the feelings of resentment if they fully understand the risk they are accepting by assigning interest in their home to a buyer until the buyer terminates and or closes per the contract.
A good listing agent knows all this plus more tricks of the trade and can be invaluable when helping sellers beware of the pitfalls of buyers backing out and how prevent it from happening when at all possible.