Federal Acquisition Regulations govern the allocation of IP arising from many gov. funded activities. For the DOE, I believe the default is that the rights are assigned to the government, with a right to practice being retained by the recipient of funds. https://www.govregs.com/uscode/42/2182. That said, agencies will waive these rights in some cases.