Cancer therapy drugs avoid the prisoner's dilemma because they are profitable to develop and sell, and so are the rational choice for a company. This is because if a company were to develop antibiotic drugs and only sell them to those who can pay the huge costs for it (like cancer drugs), people would call for their blood and their situation would be untenable. Their image would be mud, and somehow or the other, people will find a way to get the molecules to poorer people for cheap.
Cancer drugs avoid this because vastly fewer people get cancer than bacterial infections, and a company is not seen as a monster for not providing cheap cancer drugs to a very few people. But with the number of people needing anti-biotics numbering in the billions, there's no way a pharma company can justify not selling them cheaply and to poor people around the world.
Bottom line: No country in the world is 100% libertarian including the US. When the greater good vastly outweighs the benefits of a single entity, the property rights of that entity will be infringed upon.
Antibiotic drugs create the prisoner's dilemma because the rational decision for an individual company is not to develop them due to unprofitability. And in this case, everyone following individual self interest leads to a diminishing of the greater good.