I mean, sure and that sucks for them but I kinda think that is part of the risk of being an agent. Don't want to get killed by foreign governments? Then don't go and do espionage in their countries.
These are agents who have materially harmed another nation, it isn't as if they have only been acting in a purely defensive capacity and working on the internal security of the US.