If a nation is being used as a safe haven by criminals/insurgents and those criminals/insurgents conduct ops in a second nation, then the original nation is either hosting those criminals/insurgents and it is an act of war, or they lack the ability to enforce their own sovereignty and therefore lack sovereignty.

Either way, other nations shouldn't feel compelled to respect that safe haven nation's sovereignty.

I've never had a moral/principled issue with attacking insurgents/criminals in another nation's territory, provided those insurgents/criminals are damaging the attacking nation.

Of course, there are pragmatic issues involved that need consideration.