A logitech G Hub lua script made to move mouse to counteract recoil in R6. Will probably work for similar games.
Instructions: Google how to add scripts to your G Hub profiles, I will not explain this.
To adjust the amount of recoil control, you can adjust either the horizontal and vertical values or the delay. The vertical and horizontal values simply adjust the amount the cursor is moved each time it is called to move. The delay is the delay in ms between movements, so decreasing it would make the recoil control greater.
Togglekey has to be either "scrolllock" "capslock" "numlock" since thats how it is made to function. It will toggle on and off depending on whether or not the specific lock you chose is on or off.