I think you need a bluetooth mouse like this one:
https://www.amazon.com/Arteck-Multi-Device-Bluetooth-Ergonomic-Rechargeable/dp/B08W9M5T8H
I have this very unit and while I no longer use it daily, it worked fine when I did.
Back then I had a Windows computer, a Mac Mini and my iPad. This was before the iPad accepted a mouse, but I still didn't want to keep 3 keyboards and 2 mice when I switched from one device to another.
This is what I bought (It is cheaper now) and if I understood your issue correctly, it should fix your problem.
Bluetooth can only be paired once with each device. I should know because I have had to buy separate Shower speakers and several pairs of earbuds because between my wife and I we have each an iPad/iPhone and we listen to a lot of audiobooks. Each device needs 2 earbuds because the batteries only last so long and trying to pair each set of earbuds with a new device each time (even if is listed in the preferences) is a royal pain.
I am no expert, but I have a lot of BT devices and a lot of phones, computers and tablets. When I only had one pair of earbuds they always connected to the last device they paired with. That was a pain. I had to turn off BT on my iPhone, pair or connect the earbuds to my iPad only to having to do the same process in reverse if I wanted to use the earbuds with the other device.
For the record, I also own a couple of these kind of keyboards:
https://www.amazon.com/dp/B08BL9RSRJ?psc=1&ref=ppx_yo2ov_dt_b_product_details
Like the mouse, it has three buttons and each can be paired with a device. In my case I have this keyboard set up as follows:
#1 Desktop Computer
#2 iPhone
#3 iPad pro
Let's say I need to write a long text to somebody using my iPad, I simply press button #2, slide the phone in the handy/dandy slot and I type away.
After I am done, I press button #1 and I am back typing on my Desktop. In the meantime, BT did not disconnect from my desktop, which allows me to just switch without having to pair or connect again. Basically, the keyboard remains connected to all 3 devices (as long as you stay in range, of course).
Incidentally, I am here because I am looking for an adapted that can do the same with a speaker.
We have a good set of speakers in my wife's workshop and she is usually connected using her phone. However, we have separate playlists and I would love the capability of switching from my phone to hers and back like I do with the mouse and keyboard.
Unfortunately, I have found no such device.
hope this works for you.