If lawmakers wanted to pass a law that actually made this happen they needed to stipulate a cut off date (and potential compensation) as well as rigid rules about what one can do with the released code.
Why would there be a need for compensation. Copyright is only granted in the first place so that more things will (eventually) enter the commons. Rolling back the perversion that is the current copyright terms doesn't need anything to balance it out since the current sitation is already so unbalanced in the other direction.
https://www.reddit.com/r/dayz/comments/11nlu70/recently_dayz...
But even if that's an outlier, online games can have a surprisingly long tail where the game remains profitable even if the player count doesn't grow anymore (as long as the developer supports the game at least).
Meanwhile, look at Unreal. Not even sold anymore.
As it is, the source is mostly just lost to time, making humanity poorer.