I have noticed that when I use a potion of invisbility within attack range of an enemy they continue to attack me after I am invisible. This is beyond any AoOs they get for me drinking a potion. If I then run away, then they will no longer attack me until I am visible again.
Is this a bug or intentional?
Regardless, I don't think it should be this way. If you are fighting something and it just instantly disappears, then I think you would probably stop attacking and try to figure out what happened.
I could see an intelligent creature reasoning out what just happened and then trying to flail out attacks in the immediate area while hoping to catch the recently disappeared foe, but only with some check or penalty. Eg. an INT check to see if the creature would know you just drank an invis potion and/or blind-fighting penalties for flailing out into empty space
Its frustrating to runaway from monsters and use the invis potion only to get caught by them and attacked after I'm already invisible (not AoOs).