I have never seen this unit be invulnerable before, but now my sword goes right through this enemy without doing any damage. Question mark symbols float above the unit after my attack.

What's going on?
Edit: It happened again, this time with a different unit. I also noticed that it doesn't damage me:
