That is true from a physician's perspective. But the undertreated argument segways into an insanity defense which you may know is not a get out of jail free card, but rather a one-way ticket to the state hospital for at least several years if it's a murder charge, and potentially decades locked in the state hospital. Different states handle NGRI hospital time differently. Some continually reevaluate a person's dangerousness and work towards monitored release from the hospital. Others keep you in the hospital until the maximum of your potential sentence if you had been convicted. Which for a murder charge is the rest of your life.
The argument that the meds made her do it is much more advantageous from the lawyer's perspective. This argument will be an involuntary intoxication type argument, that she took medications in good faith and, through no fault of her own, the meds rendered her incapable of forming the intent to commit the crime. This actually could be a get of jail card if you get a jury to believe it. But in all likelihood the lawyer knows it won't fly with a jury, but it may be leveraged to get a better plea bargain from the prosecutor. Which could mean pleading not guilty by reason of insanity to a manslaughter charge rather than 1st degree murder, so even though you go to the state hospital, you aren't there as long.
Aspects could be wrong because IANAL