Please add the M83 command that I suggested earlier to your end GCode, also upgrade your firmware to 1.21RC3 (read the upgrade notes first) and see whether the problem is resolved.
The two wires belonging to one phase must be at one end of the 4-pin connector that plugs into the Duet, and the two wires belonging to the other phase at the other end.