If you are hidden–both unseen and unheard–when you make an attack, you give away your location when the attack hits or misses.
Does this mean enemies attacking the hidden creature no longer have disadvantage as described in the proceeding paragraph?
When you attack a target that you can’t see, you have disadvantage on the attack roll. This is true whether you’re guessing the target’s location or you’re targeting a creature you can hear but not see. If the target isn’t in the location you targeted, you automatically miss, but the GM typically just says that the attack missed, not whether you guessed the target’s location correctly.
If the attacker then breaks line of sight and becomes unattackable, then next turn becomes partially visible do they once again for enemies to be at disadvantage or is the bonus still negated?