If it does, prosecution has a few tools at their disposal. They can seal the records, justified as protecting "ways and means", they can also just decide ahead of time not to bring charges until such time as there is a successful route through which to execute a parallel construction.
The biggest issue, in a sense, isn't that defense attorneys aren't able to challenge these devices use, but that prosecutors are not slamming law enforcement for unlawful use. They aren't incentivized to in any way except by meing a radical proponent for judicial as systemic integrity. Such a personality characteristiv is not going to endear one sufficiently to law enforcement enough to likely even be informed that a case may have had less-than-legal investigatory methods employed.
Literally the only realistic way to catch these types of abuses is to essentially assume they happen, and dedicate adversarial resources with relative-to-Law-Enforcement level privileged access to the means to investigate law enforcers.
I.e. Internal Affairs/an Inspector General like construct.
In practice, however, any system that implements such a thing still has levers that can be applied to sufficiently frustrate the efforts of said groups to render it of questionable efficacy.