A good lawyer is an ethical lawyer, and an ethical lawyer does not advise a client on how to commit a crime.
A good lawyer accurately advises a client on compliance obligations. There are certainly times when a lawyer is properly asked to advise a client to minimize legal obligations. Thus, it is proper for me to advise a client about ways to minimize taxes, within the law.
But I can’t, and don’t, advise my client on ways to evade taxes or otherwise to commit a crime. No good criminal lawyer does that.