you could consider a pressure Mat approach, either something the washer walks off or onto. These come in many different shapes and sizes.
But I would think it would be cheaper, easier, and more reliable just to take the usual appliance repairperson approach and attach anti-Vibration footpads to the washer. This will stop the walking from happening in the first place.
These should cost less than $25 at your local Home Depot or from Amazon.
https://www.amazon.com/STEADY-PAD-Anti-Vibration-Anti-Walk-Washer-Dryer/dp/B0732DLVBM