Li Shenron
Legend
I think Stealth and hiding rules are generally written around the idea that you are in fact moving. I can't speak for 5e, but back in 3e days I specifically asked Monte Cook (3e DMG chief designer) about this, and he confirmed it.
When you are sneaking past the guard, or trying to get out of sight in the middle of combat, are you given disadvantage because you are moving (and possibly quickly)? I think not.
So I might be persuaded to granting advantage if you went into a hidden position beforehand and you're not moving anymore (in a "taking a move" sense) when the opponent passes by, even though this is not by the rules. I would not give advantage instead if you moved and tried to hide behind the illusory door (or whatever) in combat.
When you are sneaking past the guard, or trying to get out of sight in the middle of combat, are you given disadvantage because you are moving (and possibly quickly)? I think not.
So I might be persuaded to granting advantage if you went into a hidden position beforehand and you're not moving anymore (in a "taking a move" sense) when the opponent passes by, even though this is not by the rules. I would not give advantage instead if you moved and tried to hide behind the illusory door (or whatever) in combat.