this problem in occur in my laptopTry another mouse on your computer, or try your mouse on another. Make sure the fault is not the surface you are using. Best to use a known good surface, as like a mouse pad.
If all fails and the mouse is good, uninstall it, and then reboot. Do not delete the mouse software when uninstalling it. In the properties of the mouse simply click uninstall and reboot. The drivers should re-load.
What gets to me, it is when you plug in your charger... It could also be the charger is making electrical noise in to the computer's power management and it is affecting the mouse function. Try another power supply to see if that fixes it.
I have often seen defective mouse, or bad surface under the mouse cause this type of thing.