Source that you wouldn’t be allowed to kill unarmed enemy soldiers? Imagine a scouting team doing reconnaissance, surely you’re allowed to attack and kill them?
Laying down your arms is generally considered an expression of surrender and renders protection.
Also, who sends scouts unarmed? They should at least have a sidearm.
And it was a hypothetical, there are a lot of situations where you can kill unarmed military personnel legally.
You can just bomb military barracks full of sleeping unarmed people legally for example.