Hey, sorry but the discord overlay issue was a seperate one for me, this bug is still occuring even with the discord overlay turned off (it solved what you described but my specific issue persists)
I tested this exact thing on my work laptop today and could not reproduce this issue so it might have to do with my hardware/software on this pc, if you need further info I am happy to provide details.I also turned off all other software that I could turn off without compromising the stability of my system and the issue still persisted, same test with a different mouse, issue persisted.
You can see the effect of this specific bug in the video above