In a free market you would be right, but we don’t have a free market so pretending we do is naive.
Let’s add the rest of the context to your simplistic example:
Company A pays FDA board members under the table to approve their poison, this is illegal, but who cares, because Company A also pays lawyers, judges and politicians to cover their crimes Company A also owns all corporate media thanks to its generous ad buys. Through their corrupt business model of intentionally poisoning people and selling the antidote (partial and continued), plus a broken healthcare model where the government subsidizes both research and payment for pharmaceuticals, plus a broken insurance system that is also corrupt and abstracts the real costs from the consumer, they make tons of cash to support all their previous corrupt schemes.
Company B believes in the free market and knows that Company A is intentionally killing people and that the model is corrupt. They decide to develop, patent and sell their own non-poison medicine. Here’s what happens:
FDA is owned by A; sorry, no approvals Media is owned by A; denounces Bs products as dangerous Politicians are owned by A; Make sure no grant money is given to B for development Insurance companies owned by A refuse to cover Bs drugs; the total cost borne directly by individual consumers; it increases the price and reduces the demand.
Company B then goes out of business, because they were stupid libertarians who would rather play make believe in fairy tale land than face the reality of today’s hopelessly corrupt system.