Happens both in zones created by me and vanilla zones regardless of NPC rank. Here is an example from the zone I created for a base, level 19 outcasts NPC flees as soon as he undocks;
[NPCShipArch]
nickname = fc_ou_bw_elite2_d19
loadout = fc_ou_bw_elite2_loadout02
level = d19
ship_archetype = bw_elite2
pilot = pilot_outcast_ace
state_graph = FIGHTER
npc_class = unlawful, class_fighter, d19
[Loadout]
nickname = fc_ou_bw_elite2_loadout02
archetype = bw_elite2
equip = ge_bwe_engine_01
equip = npc_shield01_mark10, HpShield01
equip = infinite_power
equip = ge_s_scanner_02
equip = ge_s_tractor_01
equip = ge_s_thruster_01, HpThruster01
equip = armor_scale_4
equip = co_gun02_mark01, HpWeapon01
equip = fc_ou_gun01_mark03, HpWeapon02
equip = fc_ou_gun01_mark03, HpWeapon03
equip = fc_ou_gun01_mark03, HpWeapon04
equip = fc_ou_gun01_mark03, HpWeapon05
equip = fc_ou_gun01_mark03, HpWeapon06
equip = torpedo01_mark01, HpTorpedo01
cargo = torpedo01_mark01_ammo, 20
equip = mine01_mark01, HpMine01
cargo = mine01_mark01_ammo, 20
equip = ge_s_cm_01, HpCM01
cargo = ge_s_cm_01_ammo, 20
equip = LargeWhiteSpecial, HpHeadlight
equip = SlowSmallWhite, HpRunningLight01
equip = SlowSmallWhite, HpRunningLight02
equip = SlowSmallWhite, HpRunningLight03
equip = SlowSmallWhite, HpRunningLight04
equip = SlowSmallWhite, HpRunningLight05
equip = SlowSmallWhite, HpRunningLight06
equip = SlowSmallWhite, HpRunningLight07
equip = SlowSmallWhite, HpRunningLight08
equip = contrail01, HpContrail01
equip = contrail01, HpContrail02
equip = contrail01, HpContrail03
equip = contrail01, HpContrail04
equip = DockingLightRedSmall, HpDockLight01
equip = DockingLightRedSmall, HpDockLight02
[zone]
nickname = zone_hi01_pop_base2
pos = 4266.17583741402, 2796.29952009161, 16970.1440517204
shape = SPHERE
size = 2000
sort = 4
toughness = 19
density = 9
repop_time = 10
max_battle_size = 6
pop_type = fc_ou_grp, single_base_unlaw
relief_time = 20
density_restriction = 4, lawfuls
encounter = area_scout, 19, 0.120000
faction = fc_ou_grp, 1.000000
encounter = area_defend, 19, 0.220000
faction = fc_ou_grp, 1.000000
encounter = area_trade_trader, 19, 0.270000
faction = fc_ou_grp, 1.000000
```
Can this be happening because NPC count in the area is larger than density?