My Xbox one controller suffers from the well-known stick drift. The funny thing here is that it shows no defects in the Xbox test mode. In the game, my character slowly moves forward over time, if I push the stick very slightly forward, i.e. A few millimeters. However, in test mode it does not indicate that the stick is being pushed up while the character is running slowly in the game. I hope someone can help me, maybe someone has experience with it and knows their way around.
Just get a new one.
There are a lot of tutorials on YouTube and in general on the Internet, in many cases that is actually the answer to the riddle.
Stick drift can be triggered in several ways:
For example, due to dirt or wear and tear, if you have had the controller for a while, then the mechanics of the controller may be a bit worn and no longer react correctly (in that case you could also buy cheap spare parts, but you would have to use the controller disassemble)
or through incorrect assembly;
The new PS5 controllers, for example, suffer to a large extent from this, as something seems to have gone wrong in production.