So usually you are not allowed to hide in plain sight --> some classes get abilites for that.

That means, imho, that when you are hidden and you initiate combat by attacking a creature, you get advantage on that first attack (e.g. by using a ranged attack, or by not beeing seen when aproaching --> Stealth check vs. Perception check).

Once you attacked, you gave away your position and for the other creature you are in plain sight (--> PHB p. 194, 10th print: "If you are hidden - both unseen and unheard - when you make an attack, you give away your location when the attack hits or misses.") --> no more hiding, except for e.g. Skulker feat or similar.