I have had the same problem with Powerbeats Pro and Beats Fit Pro. The case uses two small pogo pins in each earbud slot to provide power. These provide the tolerance required to make a good contact with the earbud which is held in place by magnets. These pogo pins are the problem. I periodically use a microfiber cloth moistened with a bit of isopropyl alcohol to clean the earbud slots with focus on these pogo pins. Make sure to move the pins up and down with your cleaning motion. My thinking is that the alcohol will clear out any earwax or other gunk that has built up around the pogo pin and is preventing it from coming back up to full height. I haven’t had this issue recur since adjusting my cleaning habit to include the alcohol on the pins. Pogo pins do use a spring to function so like all springs it will eventually lose some of its resistance and will need to be replaced. Since these small electronics are not made to be repaired, that means buying a new pair, most likely. However, I recently replaced one Beats Fit Pro with a new pair after almost four years of near daily use. I’m pretty impressed with how far these wireless earbuds have come since the first generation.
This is an absolute winner IMHO. I’m imagining all the hotkeys that are accidentally activated when a CPU-intensive task spins up.