They (the Americans) should have also marked the schools on said military maps of theirs, and hence they could have made a value judgment of "is it worth killing some IRGC men in the middle of nowhere vs. the international backslash of killing school-going children?". It looks like they most probably didn't do that, probably because their "advanced" AI systems didn't bother with marking schools on their military maps.