Why just bankruptcy? I'd say any software copyright should cease when the owner cannot or will not continue supporting the software to work to the level of functionality from purchase or at discontinuation, whichever is higher.
So even if a company still operates but isn't keeping your purchased software working (as-is operation, not security patches or new features) at least at the level from when you bought it or when it was discontinued, then the software should become open under reasonable conditions. Free for personal use, maybe a reasonable licensing cost for companies who want to keep supporting it commercially.
There are probably many corner cases that would need to be addressed to not become a vehicle for abuse but it would be a good start towards not making software unnecessarily obsolete.
Software is inherently fragile and dependent on surrounding technology. Buy a hammer, get a hammer. Buy (rent) software, you get something that only works on a specific combination of hardware and OS, perhaps only with certain libraries, packages, and other extras installed.
So even with open code the game will still stop being supported on new platforms, probably quite quickly.
Maybe software copyright should expire when a company dies, making all source code they owned public domain.