Bluetooth devices lag after a few seconds of inactivity

I have a 8bitdo M30 gamepad and a Logitech Pebble Mouse and after a couple seconds of inactivity there’s a lag. With the gamepad for example, after a couple seconds it’s like it goes to sleep and it doesn’t register the button press, but then it starts working after that. With the mouse it lags for a moment and then the cursor starts moving normally.
I’m using Fedora 38
I tried changing these lines on /etc/bluetooth/main.conf
FastConnectable = true
TemporaryTimeout = 0
But It didn’t fix the problem.