Not possible to prevent, but there are a few steps you can take.
Do not rush anyone into a decision, not even in a hot market, with multiple bids. It can come back to bite you.
Ask questions and ask more questions.
Are you sure you want to move forward? What if you lost this property?
Who else do you need to show the house? What if your decision is questioned?
Almost try to talk them out of the purchase or the listing to make sure they are ready.
Are both 100 % they want to move forward? If someone can be talked out of selling, they need to be! Same with buying,
We have seen sellers turn down reasonable strong offers with many objections and later find out; one was just not ready to make a move; sort of sabotage.
With our 40-50 page contract, there is always a way OUT, whether it is with contingencies, dates, inspections, appraisal, and so many others.
When you are listing a home, really make sure they are ready to move. Find out why are they moving?
Where will they move?
What are their net proceeds? Who is helping them? What if we get an offer this week? Are you prepared?
You know the questions. Ask them early in the process. Ask them more than once.
You may not prevent all buyer/seller remorse, but you do need to ask and receive the right answers.