This in itself could take a while...
To me, the issue in question is when you lose your advantage to attack when Hiding. While the rules specifically state hidden = both unseen and unheard, the making a successful Perception check to negate a Hide attempt does not require you to see or hear the individual attempting to hide.
For example, if the character is lying prone behind a low wall with total cover, and under the effects of a silence spell, it's possible to still win the Perception check. One possibility would be noticing a shadow, or perhaps the hiding character's ally glances in their direction as a signal to be ready. In other words, your attempt to Hide is foiled by the Perception of the opponent, not that they directly heard or saw you.
Other statements that I think support that knowing the location of the individual attempting to hide foils the attempt to Hide are noted in bold below.
Until you are discovered or you stop hiding, that check's total is contested by the Wisdom (Perception) check of any creature that actively searches for signs of your presence.
You can't hide from a creature that can see you, and if you make noise (such as shouting a warning or knocking over a vase, you give away your position.
If you are hidden - both unseen and unheard - when you make an attack, you give away your location when the attack hits or misses.
The implication is that you are no longer Hidden in game terms. You may still be hidden from view.
Now it's true that being Hidden (in game terms) doesn't grant you advantage to attack rolls, being unseen and unheard does. But if that's how being Hidden is defined (as quoted above), it doesn't take into account that many creatures have senses other than sight or sound that improve their ability to detect Hidden creatures. For example, an Owlbear has advantage on their Perception check because of their sight and smell. Again, if a creature is behind total cover and can't be seen, the Owlbear still has advantage on their Perception roll, and if successful would know the Hiding individual is there.
Yet with the way the rules are written, that individual still has advantage on their attack roll.
Actually, now that I think about it, I do have a concise form of the question:
If a character attempts to Hide, but fails (for whatever reason) they may still be unseen. Do they still gain advantage on their attack roll?
Second question:
If a Hidden character is discovered (by whatever means), and circumstances don't change, can they attempt to Hide again?
I think that the way the rules are currently written, the answer is yes for both. I'm just curious if that's the intention of the rules because while in some circumstances these make sense to me, there are many in which they don't.
Randy