Sounds like the issue is probably the rate at which the Washing Machine pumps out, is greater than the waste pipe can cope with.
Sink will drain under gravity, so the water will drop as fast as the pipework will allow, whereas the W/M is being pumped out, and the waste cannot cope.
Possibility if an older building, the original sink waste was 32mm copper into a cast stack, the bottleneck where the pipe drops from 40 to 32mm would be enough to cause this issue.