Quick poll.
Which do you like better.
- Stealth breaks immediately after you lose cover / obscurement
- Stealth breaks at the end of your turn if you don't have cover / concealment
- Stealth doesn't break irrelevant of cover / concealment.
In combat, I'd go with option 2. Out of combat, I'd go with option 3.
In combat, there are a lot of assumptions about details that get glossed over for the sake of rules simplicity. You aren't literally standing there without moving your feet, just swinging your sword. You're moving all around the 5' square you occupy, constantly trying to be aware of threats. Flanking is an optional rule, so a second opponent walking up behind you isn't assumed to be something you'd be unable to see.
So in the heightened state that combatants will be in when in combat, I expect them to see anyone standing out in the open. If you're in the open, you're visible, not hidden. So for hiding to work in combat, you need a certain degree of cover in order to maintain your hidden state.
At the same time, combat is chaotic, and it would be easy to miss a brief bit of movement if you're not specifically watching for it. Thus the hidden character should be able to move from cover to cover and remain hidden, even if part of the movement is out in the open.
Out of combat, the amount of general awareness is much lower, even for guards, unless they're actively Searching. I've had situations where I walked behind someone for a good distance without them ever realizing I was there. Spooked them pretty hard when they did turn around. In that case, no cover was needed for me to remain hidden/invisible. I just needed to not be in direct line of sight.
And that, I think, is a key part of the quandary: that the purpose of the Search action is to manage to put the hidden character within the searcher's acknowledged line of sight. Failure means the searcher didn't manage to look in the right direction at the right time, or didn't recognize what he was seeing as being a person. Cover isn't needed, though it makes it far easier to not be noticed. Heck, crowds are a great way to not be noticed, and they're sort of the opposite of cover.
So the action of Searching is basically just, "Put this person in my line of sight, and let me recognize him as a person, or who I'm looking for." (A quick-change disguise may allow you to stay hidden from a searching guard.) Thus "finding" someone is getting them in your line of sight, so that you can "see" them (as used in spells that require you be able to see the target). Being "unseen" (ie: Invisible) doesn't require cover. You could be hanging from the ceiling, collapsed like a bum in a trash heap, or standing right behind the guard. You just have to be out of the line of sight, and for the searcher to not be aware that you exist.
I'd proceed through these steps when dealing with this:
- If someone can see you and recognize you (whether you specifically, or as a person/enemy in general, depending on the situation), then you have been "found", and the Invisibility condition ends. It's up to the GM to determine if you're in line of sight.
- In combat, the natural motion and chaos of the battlefield both helps and hinders. It helps in that you have small windows of opportunity to move through unobscured areas without being noticed, but hinders in that any enemy that can see you out in the open when their turn starts will see you, and thus "find" you. Therefore you need to end your turn with some sort of concealment or cover in order to retain the Invisibility condition.
- If someone cannot see you by default, he may Search to find you in particular, or any hidden individual in general, and on a success, "find" you, cancelling the Invisibility condition. The difficulty of finding you is determined by your initial Stealth check, but may be modified by circumstances and environment. If you're standing in the middle of a corridor as a guard rounds the corner, that's basically auto-success on the Search. If you wedged yourself up by the ceiling, he may very well run right past without noticing you.