I’m having this issue, Apple support suggested the following (seems v long winded), will try tomorrow, I think its a bug around sharing or switching. Doubt it’s hardware related.
"▪ 1. Make sure that all instances of AirPods are unpaired by going to Settings > Bluetooth > AirPods > Tap the
'i' > Forget this Device on the companion iOS device (this step is important)
▪ 2. Connect a lightning cable to the Charging Case and connect to a power source.
▪ 3. Place one airpod AirPod in the case and put them within 4 inches of the iOS device (be sure you're not on/using the phone during this part).
▪ 4. Reset the AirPods by holding the button on the back of the charging case for at least 20 seconds.
▪ 5. Once reset, pair the single AirPod to the iOS device.
▪ 6. Play music (or another audio source from the iOS device) through the AirPod for at least 30 seconds.
▪ 7. Place the AirPod back in the charging case.
▪ 8. Close the lid and wait 30 minutes. It is very important to wait the full 30 minutes with the lid closed. If this process is interrupted at all, it has to start over completely.
▪ 9. After the full uninterrupted 30 minutes, open the Charging Case lid.
▪ 10. Take the AirPod out of the case and leave it out for 10 seconds (not in use).
◦ Repeat steps 1-10, but this time place the replacement AirPod in the case in step 3.
◦ Once completed, please take the next steps.
▪ 1. Put both AirPods back in the case.
▪ 2. Reset the AirPods by holding the button on the back of the charging case for at least 30 seconds.
▪ 3. Setup the AirPods through the standard setup process "