Some were local conscripts, joint us and fight or die.
Some were conscripted children, brainwashed and taught to commit suicide missions. Many were smart enough to pretend to a point and at first opportunity escape or defect.
But yes, most of the foreign fighters will be killed or executed if captured.
If they surrender to the Kurds or Iraqis, will they be sentenced to death?