Right.
Which is why questions of property rights need to be settled by moral arguments, not by consequentialist appeals to how much or how little will be invested in producing some particular good under whatever portfolio of property rights you advocate.
If I said You shouldn’t be permitted to take cars without the consent of the car-maker–if you could, nobody would bother to make enough cars,
that would be a terrible argument too, even though (unlike in the argument for drug patents) I think the conclusion of the argument happens to be true.