POS gun not stops attacking

not sure this is a bug, i did a test … shooting a corp owned ship (friendly fire active) using a POS gun …

this worked as expected, however the Bowhead that delivered the ships was soon after also attacked by the same gun, and there seemd to be no way to stop this from happening,

is there a workaround for this besides offline the gun ?

quick follow up, onlining the weapon will reult in the owner of the ships i shot at is still being attacked (same corp)