There are a few issues to parse here --
Patents are a necessary part of motivation to commercialize in high-CAPEX industries
Pharma companies take advantage of regulatory capture and abuse the IP system to eke out longer exclusivity periods than are typically allowed by law (e.g. making negligible changes and repatenting a drug); this has been a net drain on innovation
No cap, benchmark, or standard on biotech pricing has allowed companies to slowly ramp up pricing far beyond what is considered reasonable (e.g. the gradual ramp-up to a Million Dollar Pill)
Prizes and direct subsidies already exist for high-CAPEX projects and are also a crucial part of the system as it exists today. Almost all biopharma research starts out as state-funded work out of universities or NIH, until it reaches a point where it’s ready for trials and gets spun out into a business. The trials themselves are then often further subsidized. There’s a lot of work and money that has to go into making biotech viable just because of how little we understand about fundamental biology.
The exclusivity rights conferred by intellectual property are exceptionally important in areas where the innovator’s CAPEX requirements are high, but the cost to copycats is low—like biopharma, energy, or even mining. The creation of a temporary monopoly engineers sufficient market value to make initial investment of high-risk capital on the order of hundreds of millions (if not billions) of dollars worthwhile and palatable (e.g. see https://dukespace.lib.duke.edu/dspace/bitstream/handle/10161/6707/Record5.pdf; https://digitalcommons.law.scu.edu/cgi/viewcontent.cgi?article=1019&context=facpubs).
The rules were never supposed to apply to extremely low CAPEX industries like software, however—hence why “abstract ideas” were excluded from intellectual property law and are often negotiated and renegotiated in the courts as incumbent monopolies and patent trolls try to use regulatory capture to maintain their status.