Last year, several teams I know, including mine, encountered a similar issue (robot “ghosting” the last commands it received from the controller forever until it is turned off, but only while IMEs are plugged in). Most of us theorized that the problem is static electricity being collected by the IMEs sent to the cortex. We refer to this as ESD (Electro-Static Discharge).
This year, we upgraded to the new firmware which apparently includes a patch that avoids bugging out as a result of ESD and this has worked well for us all year.However, we use RobotC and I don’t know if there’s any difference between RobotC firmware and EasyC firmware.
Another team we talked to eliminated the issue by moving their motors further up on their robot, away from the floor, and chaining them down. The greater distance from the foam tiles reduced the amount of static electricity collected by the encoders.
You could also use the big red Quadrature Encoders as they perform the same function as IMEs and I’ve never heard of anyone having this issue with those.