Install Sump Pump Check Valve on Washing Machine
If you have water backing up your drain line is partially plugged or under sized. I would fix the problem back pressure on the washer pump may cause it to fail much sooner than normal. If the line is backing up it would be advisable to run a snake down the line to clear it out. Many homes have a clean out close to washers but not all. Snaking the line would be my first thing to attempt.