Web browsers running on Macs depend on a specific piece of the operating system in order to decode video through the built-in hardware-accelerated decoder in the Mac. If they tried to decode the video some other way it would be slower, less reliable, and consume far more power.
This video decoding pathway has optional settings that the author of a web page can set, to indicate that the video being played is DRM-protected. So the operating system - MacOS - is aware of that setting.
When you take a screenshot or use any other command that grabs the screen contents, you don't get exactly what's on the screen, you get a prepared version of the contents that the OS constructs specifically for your command. It takes the DRM setting into account for any video being displayed, and when it prepares the screen grab, it renders blank boxes instead of that video.
In other words, it's not the web browser doing this to you. It's the operating system.
One way you can potentially get around this is to use an app that streams the same data from the internet, but doesn't display it with the DRM flag set. Or you could use an app that downloads the video to disk, then play the file from your disk using an app that doesn't set the flag. The "VLC" application for example.