i dont think you can fool it since even if they have docks around it you cant redock for 4 seconds and that part of the gameI see what they are saying though. You could set that dock to deny people from docking to you but you still want to use your USD to dock to public docks, so it currently still lets you use your USD to do that. This appears to use that convenience against you. It runs the public dock into you and, I assume, relies on the auto docking that happens when a docker and a rail are close enough together. Now you've been force docked. There also appears to be a workaround that uses the pickup rails that would normally be used to guide ships into a carrier. Instead, they are used as a butterfly net that tries to catch the rail docker involuntarily and reel a hostage ship in.
It does seem like both of those can be foiled by sending a logic signal to the docker or the rail to undock. . . but maybe there is some logic trick or cheeze that foils that too. Pretty much anything designed for immersion or convenience can be weaponized without lots of effort to lock it down to just specific uses.
Edit: unless perhaps if there was a massive web of the pickup docks