If you drink a Potion of Invisibility and then are hit by someone, do you become visible?
I don't see anything in the PHB that says that. Neither do I see anything like that for someone that is hiding.
According to Unseen Attackers and Targets (PHB p.194-195), you only give away your location when you attack:
If you are hidden—both unseen and unheard—when you make an attack, you give away your location when the attack hits or misses.
Am I missing anything?