My suggestion is to be smarter than AI.
Keep constatly an eye over the company tab. Check constantly if they have created a drug with same characteristics than yours, and also keep an eye over the “patents” field when checking their finances (When selecting a competitor/your own company, finances tab will switch and show the selected company finances, not only their products).
If you see a number on the “patents” field, it’s because they have spent that money for creating a patent (remember: finances tab shows incomes/spends over last 12 months). When that happens, it’s the best time for trying to be faster than them and try to patent your product before them, or if you don’t have the money, switch to a creamer and patent that product instead before they do so. Whenever you see that a competitor releases a product which could be patented and ban you to produce it, try to patent it before it’s too late.
However, it’s not easy to be smarter than AI, because sometimes they patent products which doesn’t even compete with yours. Take your time and consider any variable or data you can use to decide if take the risk or try to patent. And, of course, if a competitor tries to get rid of your cures, counterattack with a patent earlier than they do when switching from pills to creams or whatever.
PS: when using creams, you can always try to add a side-effect to your drug so it doesn’t fits the patent. You won’t get as much profit from it, but still, it’s something.