Thanks for your post... I started investigating other devices that I have connected to my MacBook while using my Apple BT Keyboad. At home in my office, I have a variety of devices...wireless mouse(Microsoft, Ergonomic), Seagate USB Drive, two WiFi printers, USB Hub, and numerous devices connected to the hub. The Apple BT Keyboard never disconnects.
OTOH, about two months ago, I decided I wanted to do some work in my car while parked by the ocean so I purchased a wireless mouse at the local Staples Store that had a USB antenna and connected into the USB port on my MacBook laptop.
In short order, while working in the car, I noticed the constant Apple BT Keyboard disconnect-connect sequences and eventually, the Apple BT Keyboard would not pair at all. Very frustrating. Reading through these posts I became curious about the wireless mouse. Bingo, turned it off, disconnected the USB antenna and the Apple BT Keyboard instantly paired and stayed that way with no connect-disconnect issues....
For purposes of being specific, it's a Logitech Wireless Mouse, Product Id: LZ61433, M187. I am surprised in that despite all the FCC approvals etc... that the integration of this device and BT would have such an issue. But, as I've learned while being in technology for 44+ years, things happen.