We just made a clear (new) distinction today. If the piracy demand is made in a system that is fine, but then goes to another system, the interaction may continue. If the demand is not made before the player escapes to a 'safe' system, the interaction may not continue with piracy.
With straight up fights, it would be similar. If the shooting starts within the ZoI, but then drags out of it, that's fine. Note here that CDs do not take shields below 50%, so they are not an attack in and of themselves.
This doesn't contradict my earlier statement - the combat engagement of a piracy encounter only begins once the piracy demand has been issued and the attacked party has refused to acquiesce to the demand. An order to halt is not a piracy demand. Jumping to a new system after a piracy demand has been issued counts as attempting to escape.