Usually there is an IP agreement. Also, ever notice the media calls it “Oxford study/vaccine” for good news and “Astrazeneca study/vaccine” when it’s bad news (like a few weeks ago when they had to shutdown to multiple people getting an unknown illness).
I work in an area where we make agreements with university’s. It’s often shared IP or publicity. Alternatively, one can publish, once the other makes profits. Or it could be something in between.
In this case, I bet everyone is doing this pro-Bono from a future profit perspective, because the government is paying for all of it.