And then you shot her, correct?!
Answer: No I did not shoot her! I never did that.
And your lawyer knows it is a lie that you indeed did shoot her, it could be problematic at that point, depending on some jurisdiction.
I guess it depends if you think an effective defense should allow the guilty to go free?
Say someone says to their lawyer they shot the person but really they are covering for their wife even to mthe lawyer. The lawyer then hears them say in court they didn’t shoot (the truth) but the lawyer just knows they are saying something different now to what they said before. It could be that.
I'm not the author of the post referred to here, but I suspect that 'guilty' was intended to be read as 'actually committed the crime'.
To be clear, I support the principle that it is the acquittal of a perpetrator is far less of a miscarriage of justice than is the conviction of someone other than the perpetrator.
But the fact we're debating how open defence lawyers are supposed to be and there is jurisdictional variation is a good indication of why criminals might feel they're best served lying to their defence lawyer, and lying as elaborately as possible rather than just avoiding confessing. The potential consequences of telling the truth are much worse than merely having your public defender think you're a fool. Plus if you're intending to test whether your denials are believable before you use them in court, you won't get a better opportunity than a privilege-protected conversation with someone who's seen a lot of excuses...