Docking while smuggling and confronted by a lawful isn't a break of rules, since RP wise, it's similar to "making a run for it".
Buuuuut maybe it could be argued it's similar to escaping a PvP fight by docking, altough freighters/transports have a bit of swing in some of those written rules.