Install a shielded cargo module in the ship builder. If you goto the Red Mile (Porimma system I think?) the ship technician there will sell the shielded cargo modules in different sizes
The shield cargo looks like the regular ones but will add a “shielded cargo” stat to your ship so any contraband you have stored in ship cargo is shielded up to that capacity
It still won’t fully clear you to pass scans, it just ups the percentage that you do pass. There are specific skills that boost this chance as well but worst case scenario just save scum until you pass through if you get caught. In my experience the smalles size one works fine unless you plan on carrying more than 120 Mass in contraband which in that case, they probably gonna catch your ass anyway
Also you can fly to The Den in the Wolf system without being scanned and sell the contraband to the trading authority vendor there as well
You can also sell and then buy back stolen items at the same price, basically “laundering” any stolen goods