Windows 11 Pro Version 21h2

Try another joystick first. If the problem repeats, take out the motherboard and check the soldering of the joystick connector. Resolder the pins if necessary. If another joystick works fine, then it could be a broken cable on your Joypad.