I believe this is called snap back and it’s been a problem in the smash bros community with gc controllers. I don’t know too much about it but I think the normal fix is installing capacitors to the sticks somehow. Probably requires soldering?
You could also try increasing the dead zones a little bit.