As with a spec’ home done by a builder you would take a deposit and balance on completion. Even a custom built home isn’t allowed to be paid in full until the C of O is issued.
As you would have signed a contract with the builder then it would be also your responsibility to complete the transaction with the builder.
You may also find that the potential purchaser’s lendor would insist on with-holding at least a portion of the money until the job was completed to the satisfaction of the new owner.
You will also have to take out a warranty insurance policy on behalf of the future occupants if you are an owner/builder. If you engage a builder to do the complete house then his warranty insurance will be transferred to any subsequent owners.
I am in Vic so some warranty advice may not be applicable in other states.