Having worked in the non-profit space my whole career, I've always thought having government funding for OSS would be a great use of money. It's a really underutilised resource.
States invest in cultural production, e.g. by film grants, software grants would be a great way to attract talent and solve problems.
I would be shocked to learn if it weren't already happening, just frequently through several layers of obfuscation. But also, just generally. The NSA, to their minimal credit, has rather leaned in to making itself part of the OSS community by facilitating the development on a lot of the security and reverse-engineering products they use themselves. Unsurprising, considering the provenance of the internet, computers, and much of the underlying tech is deeply interconnected with the US DoD and NASA.
All that said, I do think a more open-ended "US public endowment for software development" is a great idea.
States invest in cultural production, e.g. by film grants, software grants would be a great way to attract talent and solve problems.