Plenty of medicine IP is created by taxpayer-funded university researchers and then patented by companies. If we eliminated drug patents, it doesn't eliminate medicine research because that's happening independently of profit motive (though still not necessarily independent of funding motive). It just eliminates the monopolization of medicine. Pharmaceutical companies could still make a profit because they'd still be important for manufacturing the drugs and could charge a markup for it. And since they wouldn't be paying for the patents and any pharmaceutical company could compete with any other, it could lower the cost to the consumer.
Sure, but would it be the same amount of research, i.e. if privately funded research went away, would the state funded research scale up? Would they look at the same topics, e.g. would you get sildenafil from universities, or would they concentrate on "the important problems" and not serve the markets that customers also want?
Profit is a very strong incentive, and it also allows customers to have a vote in what gets researched. I'm not convinced that a more centralized research system delivers at the same level, especially in the long run. It's hard to judge, of course, because we can't run perfect simulations and e.g. look at the monopolies in telecommunication and compare them with a market in the same time and under similar circumstances, but it suggests that monopolies aren't that helpful to R&D. You could argue that the universities would compete, but either funding would be based on output (in which case the universities would just replace the pharma companies), or it wouldn't be (in which case they wouldn't really compete).
I'm not a huge fan of the pharma industry, but I'm not convinced a system that doesn't incentivize research success can deliver the same.