@ystokes
I'm not talking about a witness but the defendant himself. I find it hard to believe that defence attorneys are that gulable.
First, even with the defendant. They don't have to be gullible, a violation requires positive actual knowledge of an intent to lie. Don't ask, don't tell, that's all it takes for the attorney to be safe.
Second, it's actually fairly rare in the US for a defendant to testify at trial (after you get to trial, 80+% of cases end in plea deals). And most of the time, when it does happen, it happens against the advice of counsel.
ETA: You have to understand that in the US in a criminal trial, it is actually the defendant that is in charge, not the defense attorney. The defense attorney is there to handle procedural matters and advise the defendant.
It's the defendant who decides what plea to enter, even in the case of insanity.
A defense attorney would have to get the defendant declared incompetent before he could enter an insanity plea against the defendants wishes.