Added 3 minutes later
Why do you think it's a bug? Well, you could have placed a trap, and so what, would stalkers immediately be caught in it? Or would they leave unnoticed. In my opinion, all this is wise: if a hunter went into the forest to set traps, would he also set them on animals?
Well, if you reason like that, then goblins set a trap in the same part of the battle where the stalkers are in invisible mode, so the stalkers see where the trap is placed and, of course, don't run into it.
And in the game, it could have been done like this:
Option 1: The trap is set, and the stalkers take damage on the next turn and become visible. Option 2: The trap is set, but the stalkers don't pay attention to it. Option 3: The trap is set, but both the stalkers and the goblins take damage