Well, R&D costs are able to make their way into the pricing due to the artificial supply restriction.

If supply was not artificially restricted (through patents), then competitors would be able to manufacture the drug, supply would expand, the price would collapse, and the original inventor would not be able to recover their R&D costs.