I can’t see a government being able to build generalized software or contribute effectively to it. Governments don’t tend to have people who say no to feature requests. The end result is not a generalized good solution, but extremely specific solutions built on a generalized platform of if statements and endless configuration setups with special cases weaved through.
Governments are used to getting to decree everything from the button shade to the location of the buttons (different departments might ask for different button placements and get it) to the database type used (for the same piece of software) to the cloud vendor to all manner of additional features that require threading them through the core software. They want piles of exceptions and special cases. They want every possible scenario from the paper based days to be included in the software or it is not sufficient for their purposes. They want to specify date formats. They want to have very custom reports.
To use OSS, you basically need a generalized thing many people can use. But each government department will rapidly make it far from generalized.