Here is my explanation with some additional concepts:
A.
having, for example, been prescribed a drug at a dosage too low to be effective or having been Statements beginning with 'having' are tricky and you have to be extra careful using them. Generally these statements refer to an event that has happened prior to another event mentioned in the sentence. Now lets move on to the first answer choice: the 2 events 'drug prescription' and 'patients being taken off a drug too soon' happened before the event 'when some patients did not respond to therapies for depression';
Therefore you can also read the sentence as
Having, for example, been prescribed a drug at a dosage too low to be effective or having been taken off a drug too soon, Some patients who do not respond to therapies for depression may simply have received inadequate treatment.
So this answer choice looks good to me. Moreover the parallelism between 'having' clauses maintains the sanctity of the answer choice. Additionally, also remember that a verb form of a word is always preferred over the noun form or adjective form. Therefore, 'prescribe' as a verb is preferred over 'prescription' as a noun or 'prescribed' as an adjective.
B.
having, for example, a drug prescription that was ineffective because the dosage was too low, or being Problem with this statement is that there is no parallelism between clauses beginning with 'having' and 'being'; also refer the usage of being as mentioned here by
eGMAT https://gmatclub.com/forum/correct-usage-of-being-123156.htmlC.
as, for example, having too low of a dosage of a prescribed drug for it to be effective, or beingAgain the same problem as that of option B. Moreover the problem is compounded with the use of 'as having'...wierd!!
D.
when they have, for example, been prescribed too low a drug dosage to be effective, or were Always be careful when you see 'when'

, for 'when' should preferably refer to some event in time. Here there is none!! In addition to that, the parallelism between 'when' and 'were' is WRONG.
E.
for example, when they have a drug prescription with a dosage too low to be effective, or beenSimilar explanation as that of D, additionally look at the weird parallelism between the two clauses.
I hope my explanation helped.