Only on the buyers Side.
Sellers side only can back out if deadlines that are placed in the contract are missed. IE Inspection done within 72 hours or something like that.
But unlike buyers, sellers can’t back out and forfeit their earnest deposit money (usually 1-3 percent of the offer price). If you decide to cancel a deal when the home is already under contract, you can be either legally forced to close anyway or sued for financial damages. Of course, the specific consequences depend on the terms of your sales contract for the house.