I'm assuming this sump pump you’re talking about is actually an ejector pump in a well dedicated for this bathroom and washing machine only. Sometimes those lower level plumbing fixtures are incorrectly connected to a sump pump well designed for ground water drainage.
Since there is a vent on the power cord plug it most likely utilizes diaphragm switch, or simply, a pressure switch to turn the sump pump ON and OFF.
Diaphragm / pressure switch on a sump pump is usually positioned close to its bottom and responds to the pressure of water rising inside the well. Increasing water pressure causes the membrane / bladder inside the switch casing to trigger the switch and activate the sump pump motor. With water waste being pumped out, pressure on this membrane drops and the switch should turn the power off.
There might be a few conditions behind the behavior of your ejector pump;
The basin is contaminated causing occasional malfunctioning of the ejector pump pressure switch. You’d have to pump out everything from the well, disconnect / pull out the pump and wash it, clean the base of the well and re-assemble everything.
Bladder / membrane inside the switch could be damaged or deteriorated which prevents proper response to changing pressure. You would have to order a new switch for your ejector pump.
Internal component of the pressure switch could be failing and cause described behavior. It will eventually require replacement.
Other than that you can remove the plug from the outlet, clean it, and suck the air out of the tubing. This is exactly what water does to the membrane by pushing it from the other side. In a quiet environment you should be able to hear a click / relay energizing the switch at some point.
Quickly cover the tubing with your thumb and plug the cord back into an outlet, the pump should start, pump everything out and stop. You can repeat this procedure a few times in a row to see if the ejector pump switch is responding properly to pressure changes.
However, I would simply start from cleaning of the ejector pump and its basin.