-
If you have to take it, does it really matter? Your health needs trump your diet needs every time. In answer to the question, it depends very much on the medicine. It's unlikely even your doctor would know, as there's no reason for this to have been studied for whatever meds you are taking. And it's complicated by the fact that different people react differently anyway. The only way to be sure is to do your own personal study, get a glucose meter and a ketone meter and do before and 30 minutes after checks to see how it impacts them. If you don't want to go to that expense but still want to IF, then I'd suggest setting your fasting hours to included the window of time when you must take meds.
There's a very interesting video by the folks at keto connect where they did this very thing with a wide range of natural and artificial sweeteners. Their results differed from the common beliefs on some sweeteners popular in the keto community. It was very informative. You could adopt their methodology for your own tests.