Yeah, I hate this bug, I mostly notice it when I'm TRYING to attack an NPC. My hypothesis is that they're really just "GHOSTS", they're not "really" there. I mean, the enemy exists, but it's actually somewhere else and it's some sort of error of the game drawing it in the wrong place.
Notice how when you hover your pointer on an enemy, the pointer normally changes to a crossed swords pointer? And how sometimes it doesn't? I think when it doesn't, you're pointing at a shadow/ghost/what-have-you.
It's probably all tied up with the really-buggy unit stacking problem, or at least related.