Why not have it that the court can use evidence that is presented to it. Those committing illegal searches should be prosecuted. Obviously the evidence of the illegal search means a conviction is highly likely. Ignoring evidence that points to the facts of a case seems futile if you wish to achieve justice.
If you're allowed to use evidence from an illegal search, there's a huge incentive to keep doing illegal searches.
If you want to curtail illegal searches, then you make such searches have a worse payoff.