I use a surface Pro 4 at home and have a Surface Pro 6 at work and both display exactly the same symptoms (I have even swapped the device for another which does exactly the same), both have been rebuilt (software) and drivers updated and replaced. It appears to be an intrinsic design fault with the Surface Pro's I'm astonished with my experience that it isn't more widely reported (I've even seen the same issue on a Pro 5). The fault is specific to the track pad, when connecting a USB or Bluetooth Mouse there is no such issue.
The issue needs to be properly researched in a Lab, you won't fix this problem by suggesting driver or OS updates.
I haven't replaced the OS completely for another, Linux for instance to determine if the issue is definitively Hardware or Software, it is possible that a core element of the Driver Software is affecting the operation which persists from version to version (drivers are rarely completely re-written from scratch between versions), the power being connected could of course in some way be causing interference with the connected keyboard.
Because I use a connected mouse at work and generally use my Surface at home off power it has been a minor inconvenience (and I guess most will work the same way) but it is a repeatable and consistent issue that Microsoft ought to research properly.
The consequence for me is that I won't buy another Surface for personal use as I need reliability, My work has also stopped buying these for the same reasons (I'm CIO at my organisation). Shame really as otherwise the devices are great.