Does this process work for let’s say DRM encrypted music too?
No. These use Widevine DRM.
As you can tell from the security section of the article, it is not exactly impossible to crack, and I'm certain private groups have their own way to get past it.
But if you're just looking for audio, then you can just record your computer's output audio stream.