Well, that’s a bit intentional - the “AI” itself is programmed to target the closest enemy. That includes the one in other rooms, unfortunately.
Thanks for pointing this out tho - a good idea might be to spawn them in later on when it’s needed. But now, perhaps consider this as a feature players have to overcome.