@samuelll1211 Backlash compensation isn't ideal for 3D printing, it's rather meant for CNC applications. It would be better to tighten your belts and pulleys and check if you can get rid of your problem then. I'd try to measure backlash with a leadscrew drive by moving e.g. in +X direction and then jogging back in -X in very small increments until I could see (or measure) movement.
If you are certain your belts and pulleys are all tight, you could also consider an upgrade to stronger motors.