For 2+ years I had no issues using Sonos speakers and AirPods off the same devices. All great. I typically play to Sonos using AirPlay rather than the Sonos app.
In the last ~1 month, I am getting really annoying behavior where I can’t successfully switch from AirPods to Sonos - I get the spinning wheel of death on the speaker glyph in OSx/iOS. The variation is that it’ll connect, but when I close the AirPods case, it’ll drop the Sonos connection and I can’t re-establish it. When I check the Sonos app, it thinks the speaker is playing the stream but it is actually coming out of my laptop/phone speaker.
The fix is to reboot the speaker.