While it is hard to be certain, the fault is liable to be the implementation of HDMI-CEC by Samsung, since the TV set is the hub/controller of all CEC devices. There are several suggestions that might help.
First, make sure the TV is updated with the latest software from Samsung. Over the last several years, they’ve had updates which appear to have helped some, although that may depend on what hardware your particular TV has.
Second, make sure to turn odd HDMI-CEC on all devices connected to the TV except the Sonos. There are other companies who appear to have poorly implemented the HDMI-CEC spec, and some of these devices seem to interfere with the Sonos connection.
Third, try changing the connection that you’re using for the Sonos from a HDMI-ARC to optical, using the adapter that came with the Beam. Optical, being a one way signal, won’t have these ‘handshake’ failures that can be experienced by HDMI-ARC. Of course, you’ll need to make sure that all devices, the TV and anything connected to the TV as a source, is locked down to Dolby Digital, since that requirement is no longer carried through the HDMI-CEC connection.
Finally, many people have experienced issues with the electronic signal path through the TV adding a delay, causing lipsync issues. Many have found by stripping the audio signal from the stream before it reaches the TV resolves this issue. They do so by implementing an HDMI switch that has an optical output that feeds the audio signal to the Sonos. There are many types of these devices available, but I don’t use one, so I don’t have a recommendation. Search Amazon for ‘HDMI switch optical’ for one that meets your specific needs.