Pirates still will only attack targets within the same star system in Entrenchment/Diplomacy. Specifically for Diplomacy, Pirates become more of a challenge to take out, especially if they are enabled. If enabled, the Pirates recieve two random upgrades to their ships (weapon damage, weapon range, max hull, hull regeneration, armor, abilities) each time a raid is launched. After enough raids, the Pirate ships have enough armor to surpass the armor levels of Starbases (save perhaps for the most heavily upgraded ones), insanely high hull points, etc. Their defensive turrets at their base even gain a flak ability (quite similar to the Kol's Flak Burst) that can maul strike craft when they're clustered together.
Avoiding these super-Pirates is fairly simple - disable the Pirates in the Game Options before you start the game.