Hi,
I'm assuming your device has had an update recently?  I found a similar issue on my new phone (Pixel 10).  Searching online, I've found out that Android 14/15 can interfere with Bluetooth HID devices (pedals) and found the following information:
Troubleshooting Bluetooth Pedal on Pixel Devices
On Pixel phones running Android 14 or newer, make sure Developer option → “ADB Bluetooth handover” is turned off. Otherwise, the pedal may connect but send no key events.
I tried this on my Pixel 10 and this made the pedal work again.  I don't see this issue on my Samsung S9FE tablet at all.  Can you try the setting above.  
If you've never used developer options on your phone, it's easy to do.  Go to your Android settings and find the information listed as Build number (quite often this is found on the About device page).  Tap it repeatedly (approx 7 times I think) and it will tell you you have enabled developer settings.  Once you have enabled developer settings, open them up.  Usually there is a new Developer settings option under the System settings page.  Scroll down until you find the Disable ADB Bluetooth A2DP hardware offload settings and switch it on.  You will likely have to restart your device.
Can you let me know if this helps?
Gareth