The HDMI switches are likely not working because the Beam requires an HDMI-ARC connection, not standard HDMI signal. Some switches can passthrough HDMI-ARC, but I’m not really sure that could help in your situation. The TV would be connected on the output side, while the Beam would be one of the inputs, as ARC (Audio Return Channel) data flows in the opposite direction of normal data flow. You wouldn’t be able to get audio from your BT to the Beam that way.
I probably would look at using an optical switch instead. Does your TV have an optical output? If so you could use an optical switch to switch between TV/BT, then use the Sonos optical adapater between this switch and the Beam. Of course, that means you won’t be getting any Dolby Atmos content though.
There are probably some better ways to do this. perhaps with an optical to HDMI adapter, HDMI switch, and HD Fury Arcana, but that gets rather complicated and expensive.
Perhaps the best solution is just to buy a Sonos Roam. The Roam can be put in Bluetooth mode to receive bluetooth audio, and then be grouped with your Beam (only connected to TV)