Earlier quoted context omitted.
If ivermectin actually worked, pharma companies would just make a new version with a slightly different structure and patent/sell that formula instead.
No they wouldn't, because it would be trivially outcompeted by current ivermectin which can be had for very, very cheaply.
Ketamine is widely available and cheap, but the FDA approved esketamine (the S enantiomer of ketamine) and gave the pharma companies a patent for the formulation so they would fund the clinical trials that are needed for it to be used as a treatment of depression.
Esketamine is much, much more expensive than ketamine, and essentially the same molecule, yet it hasn't been 'outcompeted' by ketamine (in the context of treating depression).
Because the new ivermectin (newermectin) would be specifically authorised and used to treat covid, it would have a niche advantage over ivermectin. Ivermectin would still dominate treating parasites, but there would still be good money in developing newermectin.