How to disable Dinput

How to disable Dinput

I activated DInput for the Gyro once to test using it for racing and flight sim games. But afterwards it has always been on and seen by steam as a controller. Even when the Joystick Output setting is disabled. The problem is that it messes with a bunch of games' controller support particularly if the rely on Steam Input. The only fix is to disconnect the mouse completely, then the games are playable with a controller again. Is there a fix that doesn't rely on disconnecting the mouse completely?