If this is your first time enabling Steam Input on the controller, you may have to restart Steam and disconnect/reconnect the controller for it to be properly detected:
A lot of people seem to have trouble getting it to work the first time for some reason (possibly having used other software with it before?) but once it's set up and working correctly you shouldn't have any more trouble.
You must have the Steam Overlay enabled for it to work too, and some older overlay software (e.g. GPU stats) may conflict with it.
That seems to fix the problems I've had with switching away from the game to something else and then going back to it, thanks.
Maybe it did cause problems at some point, but not for Sonic Mania.
There's virtually no I/O activity during gameplay except for what I assume is saving when you complete a level or enter a bonus stage.