I've never heard of that issue before. It could be that the audio in mirroring is in a format that Sonos can't understand, such as DTS. I'd be surprised by that though as most youtube seems to be in stereo. The other thought I have is that your TV just won't send audio to external speakers during mirroring.
In the Sonos app, you can go to More...->About Sonos (or something like that) and look at the data for the Beam. You should see what format you're Beam is receiving, if anything at all. Most likely though, I think your best bet is to contact the TV manufacturer about this though, or forums from the manufacturer.
Danny