A buyer
can withdraw an offer anytime up until the offer is accepted by
the seller. After that, the seller may owe the commission to the
broker, and may well turn around and sue the buyer for breach of
contract to recover the cost of that commission.