No, changing the user agent doesn't change anything. I believe it's the Widevine DRM level or rather the lack of support for L1. The whole point of DRM is to make it not easily circumventable, so the best solution is piracy.
So the "problem" is hardcoded where? changing the useragent will make the server give both Linux and Windows the same exact data I think, am I wrong? So it's the browsers fault? Or there's something I'm missing?
The DRM component you need to be able to decrypt the video is not available, even if you get exactly the same data streamed to your Linux PC, that a Windows/Mac PC would receive.
The user agent tells the web server what browser requests the website. It's up to the server whether they ignore the user agent.
DRM protected content isn't just a http connection away, it's encrypted content loaded after the initial website is displayed. The video is then decrypted by a proprietary DRM library called Widevine.
Widevine has multiple security levels and Linux only supports the most basic one. This results in low bitrate/resolution with no way around it. The reason Linux only support L3 is that copyright holders don't think Linux graphics stack gives them the same DRM guarantees that Windows/macOS/Android gives them.