I have the same issue. It happened the morning after I updated my phone to ios18. There is no fix, keep reading, you will see I have tried everything. My temporary fix is to turn on single earbud noise cancelling, which is a very weird feeling at first.
No matter how many times I hard reset my AirPods, as soon as I use my computer or iPad while listening to audio on my phone, the AirPods jump to either alternative device and immediately go to transparency more and disable the "off" function of noise control and I get the three low pitch beeps when I try to change it.
I will turn off my computer and iPad, hard reset my AirPods and restart my phone. Connect to the phone as a new device and everything is fine for the day at work. Then I come home from work, I'm listening to a podcast on my phone with left or right AirPod in, and as soon as I turn on my computer, it connects to the computer and turns on transparency, then when I long hold (three fast low pitch beeps) I am no longer allowed to turn off noise control.
I have not updated my Mac, it is on Sonoma. I refuse to update, because I am afraid another device will stop working. I digress, but I can no longer use my Magic Keyboard in bluetooth mode since updating to Sonoma, this is getting ridiculous.