I was plague with this issue as well, as time passes by i just didnt care at all i just give up. i installed all the updates and firmwares that microsoft releases hoping it might get fixed,
To my surprise my surface pro 7 is now free from this issue i think around 6 months now, either charge or unplugged from charger it doesnt matter touchpad is working properly, i dont know which particular update from microsoft or firmware that fixed the issue but as of this writing it works great. As it like it healed itself
I hope your surface will heal itself too.