Pharma companies don't necessarily lose out with single payer. Consider that the vast majority of drugs prescribed are generics, and most generics (aside from those making headlines) are available pretty cheaply (you can check GoodRx to see real prices). Of course, you might shave a good amount of profit from big pharma by negotiation (if there's a single payer or a few payers, they have a lot of power), but you don't want to stop R&D. How we shift that R&D burden and to whom, I have no idea.
Disclaimer: I work in big pharma research (nothing to do with pricing)