Okay, my 60 francs cfa is that "that" is for identifying more closely the thing you want to talk about in contradistinction to other things, while "which" tells you something else about the object that you didn't know before.
Imagine: "Officer, please find the white Mercedes that made off with my little boy!" (not just any old Mercedes but that one – a mnemonic?) contra "A white Mercedes, which had been stolen in California, was found in a ditch outside Boston." The being stolen does not identify which Mercedes, it adds information, perhaps not the information that interests you.
Or, "The white Mercedes that was involved in the kidnapping was found in a ditch outside Fargo, which is a small town in the Dakotas." (In this usage, both the "that was" and the "which is" can be elided, I think there was a thread about that.)
This pattern is not the only one, but it's frequent.
Your sentences about the medicines: My taste is for the second, but I would not say that the first was a hanging offence.