So long as the contract is properly written, a provision providing that the buyer will sign a Deed to avoid having the seller go through a foreclosure process to reclaim title to the property would be enforceable.
From a practical standpoint, the question could be: “What if the buyer will not sign such a deed?”
The seller would then be filing a lawsuit to enforce the contract.
As an alternative, the parties may want to consider having the buyer sign the Quitclaim Deed in advance when signing the contract, and the seller holds the Deed until such time there is a default on the Deed of Trust.
Standard Legal Network offers a Quitclaim Deed legal forms software title that could be used for such purposes.