My interpretation of the hiding rules are subjective and tweak around a bit from situation to situation. Here is the basic underlying goals that I keep in mind when I arbitrate the rules:
1.) The PCs are heroes and should be effective at doing things that they've sunk resources into doing. If they are training in stealth and wear stealth compatible armor, they should be able to be sneaky. I roll a stealth check, in secret, for the PCs that are hiding and do not tell them what they rolled. Then, I apply that roll until they tell me they want to hide again. This allows them to act without knowing exactly what chance of success they have.
2.) Generally, I keep in mind three DCs for a hiding PC for each potential observer: Their unadjusted passive perception, and the passive perception modifier for advantage and disadvantage (+/- 5).
3.) If a potential observer is distracted (in combat, engaged in discussion, etc...) I give them disadvantage. If they are not engaged in activity, they get their passive perception. If they're on guard (using their action to look around), they get advantage and get to roll to spot them (Their passive perception +5 is the floor, but they get 2 rolls to try to get higher than 15 on the die). All of this is a judgment call. I also factor in whether the PC should have had advantage or not against the observer when they rolled their stealth roll... sometimes resulting in the PC having different stealth scores for two different observers (example: PC should have advantage versus observer 1, but not versus observer 2 - I roll a d20 and apply it to both, then a second d20 and if it is better apply it instead for observer one). This can get complicated to track, but I have a tool that tracks it for me on my initiative tracker.
4.) A target must have cover/concealment, generally, to hide. Once hidden, they can move from cover/concealment to cover/concealment during their movement, but I effectively give them disadvantage on their already rolled stealth score - If the observer was distracted, they do not suffer disadvantage at this moment (lose the -5). If they were not engaged, they get advantage (+5 to passive perception and 2 rolls to beat 15 on the die). If they were on alert there is no change (+5 to passive and 2 rolls to beat 15).
5.) Loud noises, attacking, spellcasting, etc... end hiding, generally, but I make judgment calls. It may end hiding versus some enemies, but not others, especially if there is total concealment versus some enemies.
6.) PCs get the benefit of the doubt. Enemies trying to do the same thing do not. (The PCs are heroes - life is not fair).
Generally, this works really well.