Only if the creature is hidden solely by invisibility
Being hidden simply means that other creatures are not aware of the hidden creature's current location. This doesn't always rely purely on sight, though that is most often the method used.
Stealth. Make a Dexterity (Stealth) check when you attempt to conceal yourself from enemies, slink past guards, ...
If they are using magic that renders them invisible then yes, they would no longer be hidden.
Assuming though since you said there is no cover, then they are not hiding behind any obstacle or living being and are in plain sight. If they are not attempting to blend into the environment in any way such as the or ranger hide in plain sight trait then they ...
See Invisibility (PHB, 274) only does what it says.
For the duration, you see invisible creatures and objects as if they were visible, [...]
If being invisible was the only thing allowing a creature to successfully hide in the first place, then sure... the creature is not hidden to the person benefiting from the spell. They're still hidden to everybody ...
Your third interpretation is the way surprise works by the rules.
The rules on surprise state (emphasis mine):
The DM determines who might be surprised. If neither side tries to be stealthy, they automatically notice each other. Otherwise, the DM compares the Dexterity (Stealth) checks of anyone hiding with the passive Wisdom (Perception) score of each ...
What happens when the stealth check is failed
First lets look at the rules of surprise.
Surprise (Starter Set Rulebook 9)
The DM determines who might be surprised. If neither side tries to be
stealthy, they automatically notice each other. Otherwise, the DM
compares the Dexterity (Stealth) checks of anyone hiding with the
passive Wisdom (...
All of those would be fine and correct. As a DM you are the judge and it's up to you to decide which of these would apply to a certain situation.
You could pick just one and use it along the whole campaign or you can switch as you see fitting.
You could also clarify to your players why are you doing a group check in a given situation and why you would use ...
The module makes no mention of a Dexterity (Stealth) check, implying that finding the secret door could be enough to trigger the surprise sequence.
Given the low DC to spot the secret doors, the NPC's low passive perception, and that the NPC is occupied by another task, it's entirely possible that the players need not roll any dice, assuming they aren't ...
You are surprised if don't notice a threat
The rules for surprise state that you only have to notice a threat in order to not be surprised:
Any character or monster that doesn't notice a threat is surprised at the start of the encounter.
If you have successfully hidden then you are undetected
Even if a monster notices someone else in your party, if ...