The NY Times reports why the US military were killed. They state:
Air defenses failed to stop an attack on a U.S. military outpost in Jordan on Sunday that killed three American soldiers at least in part because the hostile drone approached its target at the same time an American drone was returning to the base, two U.S. officials said on Monday. The return of the American surveillance drone to the remote resupply base caused some confusion over whether the incoming drone was friendly or not, and air defenses were not immediately engaged, according to the officials, who spoke on the condition of anonymity to discuss preliminary findings into a major contributing factor to the incident. Two other drones that attacked other locations nearby in southeast Syria were shot down, they added.
For almost a century we have had IFF, Identification Friend or Foe. One would have expected this in our most advanced systems, but alas like so many software systems today they are designed in my opinion by arrogant and ignorant morons. Pity!