MIDI lags when using the pedal on my digital piano

I have this weird behaviour when playing on my midi piano. The keyboard is quite old but I never experienced this before. When plugged into my brand new UR-44C, I have some of my notes playing with some noticeable lag when I use the pedal.

This never occured with my previous interface, so I’m wondering if this could be a driver issue?

Has anyone experienced this?

Do you have another midi interface to make the same test?
Just to confirm the behavior is in fact related to the UR44C.

If you have the same issue when using another midi interface, try opening your pedal and cleaning the pot wih contact cleaner (or WD-40).

This only happens when using the MIDI connection. When listening to the direct output of my piano, I hear no delayed notes.

I will eventually try to plug my old interface back in and see if this happens.