I had this exact issue except not on Steam Deck. In my case the setting for "Steam input" was incorrect. I set it to use "Steam input" and for some reason this made the xbox controller not work/be detected properly.
You can also quickly test and disable this in the steam library: right-clicking the game in the library -> properties -> controller
If it's enabled there you can try disabling it. If that fixes it as it did for me, you have to change the settings for steam input in the backend.