There is a difference between just compensation and outright greed, there are drugs that have been on the market for many years that still are overpriced. Fair or not Americans pay 30 to 50% more for meds than those in say Canada or Europe.
That’s because Americans are subsidizing their price controls.
If we pass laws making these new drugs generic as soon as produced then R&D will stop. Many miracle drugs in the pipeline will never exit the pipeline. This is, in fact, what I expect to eventually come about. A socialized medical system will not pay for R&D except possibly for government R&D of antibiotics when the rulers realize that without replacements for constantly fading antibiotics their own lives will be more precarious. Government R&D will only happen when old antibiotics are past replacement time because that is government work and they will always be in very short supply so will be rationed to the "deserving," i.e. those who rule.