This is a classic partial-blockage symptom. Everything looks fine at low flow and fails at high flow, which is why the sink drains normally the rest of the time.
Clean the sink trap and the washing machine standpipe trap first. If the surge still backs up, the horizontal waste run needs clearing properly.
Detergent scum plus fat is a stubborn combination in a narrow 40mm waste pipe. Jetting restores the bore; a strainer and better fat habits keep it clear.