Make sure you are using raw input, not direct input or cursor, and turn off mouse acceleration. You can go one step further and a disable enhanced pointer precision in windows control panel(don't think it's even necessary with raw input), and disable any dpi scaling(or whatever it's called, the one like 125% 150%).
I was also recommended to disable full-screen optimisations.