Some mice may store it on-board, but most won’t. XIM’s YX Ratio does the same thing and can be set independently for HIP, ADS and AUX subconfigs. Mouse-based X & Y sensitivity can’t do that, so it’s best done via XIM Manager.
XIM or mouse-based antirecoil is actually quite poor. Reason being is that downwards mouse movement stacks with antirecoil and creates unpredictable aim. It can also be hard to track an enemy moving up, left or right while shooting. That’s why good recoil scripts disengage antirecoil when intentional mouse movement is detected beyond a specified threshold.