Are you experiencing mouse lag in the desktop and none in game?
If just on desktop please disable scroll inactive Windows feature.
Step 1: Go to Start > Settings > Devices. Step 2: Under the Mouse tab, locate to the Scroll inactive windows when I hover over them option and turn it off. Then, check if your issue is solved.