Washing machine using cold water only
The hot and cold water enters what amounts to a mixing manifold inside the washing machine. When cold water flows into the manifold, the pressure inside the manifold is necessarily higher than ambient pressure. Since both the hot water electromagnetic valve as well as the feed hose are now open, they allow water to flow out of the manifold. You should remove the hose from the washing machine and plug the hose attachment nipple using a flat screw-on plug cap with a sealing washer inside. It's possibly cheaper than butchering a hose to fashion a plug.