Now perhaps you can answer my question. Why have rules in an RPG if not as a way to determine what happens?
Thanks, I'd love to.
I think rules are important. Otherwise the game aspect of RPG is not there.
It's just that the designers can't anticipate every situation and cover them in the rulebook, or otherwise you have unnecessarily big books and so much rules you can't remember anyway.
Also, as you can see in the example of stealth rules in former editions, no matter how often they are errataed, some corner case is forgotten or worse, when one is covered, a differen one is created.
Or lighting rules and concealment in 5e. Everyone knows how it works in the real world, but writing a rule for that, so it always works correctly is nit that easy.
So what I do is trying to apply rules as rigid as possible, because otherwise players don't have a frame to rely on. But in the described scenario, I would possibly just rule wrong, because I might not remember the exact wording and I rule on the spot, and in most cases noone would object, as long as I am close enough to the actual rule (because I am usually the one who remembers rules most correctly).
Then of course in this case: if the invisible and hidden creature is not trying to annoy the shooter, I can't imagine many situations, why it should close to melee range anyway and not just stay 10ft away.
So If I'd remembere the rule correctly, I'd just inform the player: do you really want to close to melee range, because there is a good chance the archer might accidently bump into you and you are detected. Or at least, he will at least somehow feel air swirling around him by your movement and will be distracted (and gains disadvantage) but might be aware, that something around him is foul and might look for you.
And if the player says: yes, this is exactly what I want: I close to melee range, and if the archer tries to shoot at my friends, I will immidiately attack him (ready action to attack on trigger shooting).
So in most cases, where closing to 5ft of an archer as an invisible hidden creature, there won't be a problem anyway with those rules, so we might have gmfun games together, without ever coming to a situation where we had an argument about rules.