I'm betting this has to do with your OS settings for two things:
- Bluetooth device sleep settings
- ID mapping for BT devices
If X minutes lapses without activity, your OS may put some device and device controllers to sleep, like USB and BT devices. Install 'powertop' and look to the tunables tab to see which has which.
I would also have a look at the deviceid of the Bluetooth controller while it's working, and then check again afterwards. I think you can use 'bluemon' as an easy tool for that, but whatever works. If the ID changes, then it's possible steaminput isn't paying attention to it.
Depending on your OS, you may have to install some compatibility tools for Steam as well. On Debian-based, it's called 'steam-devices', but there are others that work as well. See the Flatpak section here: https://wiki.archlinux.org/title/Steam about 'steam-devices'.