This is likely to be a problem with your USB/MIDI interface (if it looks like
this, it uses the CH345 chip, which is known to be buggy).
If possible, use the USB connection. Otherwise, get a USB/MIDI interface from a reliable brand, such as ESI, iConnectivity, M-Audio, Miditech, or Roland.