That’s not the case. It happens, for sure. I know some hair raising army jokes, but plenty of military people recognise their opponents as people just the same.
It is also something that must be resisted, because that’s how you get war crimes and genocides.