Apple TV loses sound when switching apps
I have an Apple TV 4k connected to a HDMI input on a 4k Samsung TV and sound is provided by a Sonos Arc via the HDMI eARC output.
The sound DOES work, but not always. For example, I might go to the YouTube app and the sound works, and then I leave and the sound still works while navigating in Apple TV (you can hear the clicks), but then a purchased movie has no sound. Then if I go back to YouTube I might or might not have sound. The same thing with Netflix. Sometimes to get it to work, I change the VIDEO format from 4K HDR to SDR or vice versa. Restarting it also works, but there must be something else I can do.
Because this is only happening in the Apple TV system, I'm not sure what else I can do.
Apple TV 4K, tvOS 15