| It is written in their script. You are still non-detectable, invisible, i.e. True Sight and the like will not reveal your presence, but those monsters can see and attack even Invisible or Sanctuaried characters. Some other enemies can do it as well. Almost any 'boss' can see you and target you with spells while you're invisible or hidden. Maybe Irenicus is the exception. But for instance if you play Jaheira's quest, Reviane and Dermin will cast spells at, attack and see an invisible character without any trouble, while the rest of their party will stand in place doing nothing.
Most of the tougher demons can do this as well. The Fell Cats in Yaga-shura's lair can also detect you. There are more enemies with such a script, yet I cannot remember all. Ah, yes, liches have this ability too, so don't rely on improved invisibility+SI: Divination when fighting them.
This is not a bug. |