Welcome to the community
i believe that could be your sound-device a.o. latency-settings.
The recommended sound-device for windows, is SDL.
Cables connecting the device could also be a reason
I dont own a keyboard, so this is not from own experience
similar
viewtopic.php?t=1761