Hi
It seems to me, that as you say it gets worse when you hold down the sustain pedal and engage in other midi activity , that your pc is getting short of resources , for processing the audio as well. This is why it gradually gets worse sounds like buffer overflow.
You could try adjusting you audio buffer sizes
And stopping other activity like AV and any other background programs running,

If W10 check that windows update has not changed your minimum processor state to less than 100% IN YOUR ADAVANCED POWER OPTIONS SCREEN
Mike


BIAB2021 UltraPlus,AsusN55S1Tbssd, W10/64,Akai EIEpro
Yamaha CVP405,SquireStrat, CoolsoftVMidSynth
Novatation Impulse61 Ctr kbd, Cwalk blab Kontakt

http://mikesmusic.byethost16.com/