A judge will simply throw out any evidence that was facilitated by a lie. Any good defence lawyer would wield this just like they wield bad chain of custody etc.
Nope, the most competent defense lawyers are probably the federal defenders, who is backed by the resources of the feds, and have a much lighter case load, so they're able to actually spend the necessary time to mull over the minutia. They don't get to pick their clients and are frequently forced into being generalists, but on the federal level a lot of the "small time" crimes are kicked down to the state level. The feds prosecute terrorism, the local prosecutors prosecute murder. The thing is, the public have no idea what makes for a good attorney in any particular field (and it's not the jingle or Cellino and Barnes would probably be Supreme Court justices before the firm broke up), and public defenders are among the very few who have no choice in selecting their clients, the strength of the case, and with 80-120 open cases at a time you either really believe that your clients are all innocent or you absolutely need to hold the state to account as a matter of principle or you won't make it through the misdemeanor docket, never mind anything more serious or more sordid (mental health, juvenile).
Public defenders don't get into the line of work as a backup option. At least at my law school, they didn't recruit, because frankly they can't beat private firms or even the prosecutors on just about anything but the possibility of being on the right side of history. The pay barely covers interest on your loans, even during trials you have to run out to fill the meter every 4 hours where I was at - only the police got free parking. Everyone in my class with my skillset ended up at an IP firm or doing in house work somewhere, mostly in the Seattle area but also down to California. I don't regret a minute of the work, but in the grand scheme of things it's impossible to make a difference on any scale when you are an active participant in the system which is inherently skewed and allows prosecutors so much leeway and so much coercive power that the police can totally get away with not outright lying in interrogations and just play on the ignorance of the accused and implied threats and achieve the same result. The lying is just the most fun a cop can have without planting a gun on someone.