It's not like public research funding comes at the expense of private research. Public research funding allows there to be a higher total number of scientists doing research than there would be, all else equal, without it.
And there are clearly things patents don't provide the right incentives for. Anything that benefits all of humanity is very difficult to recover the value of as a patent because engaging in licensing transactions with every single person everywhere is prohibitively expensive. And then the license fees artificially reduce adoption of the invention until the patent expires due to supply and demand (price goes up, demand goes down), making it even harder to recover the full value of the invention. Which would imply that patents necessarily result in under-investment in research.