No problem at all. Just release your own source code. Leave out the licensed stuff. That's how id did it. If you have non-ridiculous development practices, knowing what's your IP and what is not is a basic requirement anyway.
The modder base will reimplement the licensed stuff, if needed.
What if your licensed component is non-trivial, e.g. provides critical features so that omission renders the service entirely non-functional? These laws would need to cater for that scenario, as skimming over that detail and allowing stripped releases would either mean:
1) companies get to release broken, incomplete source under the banner of commercial licensing restrictions.
2) truly upstanding companies (/s) will use this as a loophole to block the majority of their source as commercially licensed by stuffing it all under related companies and licensing it back to themselves. e.g. Company A selling game licenses majority of source (say, the entire server platform) from Company B -> Company B can't be compelled to release their engine because they aren't selling the game.
#1 would be an annoyance through to major challenge depending on the scale, #2 seems a more likely outcome for the major players as they can afford to play that sort of game and get away with it.
To be clear, I think this law should be implemented. However it would be pointless to pretend that licensing constraints won't add significant complexity, and many inventive pathways to highly evasive yet technically compliant outcomes.
I think most people are looking at existing games made under different constraints and concluding that it can't be done. But If the law passed, to me it's quite clear that it's just something that would have to be considered during development - like, we already have to get a sign-off from legal on using any open source libraries, and they usually say if it's fine for something that ships vs something that doesn't. If we knew beforehand that server binaries will eventually ship then that changes the answer from legal, and we either don't use it or try to licence it for that usecase.
The modder base will reimplement the licensed stuff, if needed.