The rules are sort of unclear about this, and the book directly calls out the DM to make a judgement call.
Here is the extent of the PHB rules on hiding:
You can’t hide from a creature that can see you, and if you
make noise (such as shouting a warning or knocking over a
vase), you give away your position.
That's... not very helpful. But wait, it was errata'd:
Hiding (p. 177). The DM decides when
circumstances are appropriate for hiding.
Also, the question isn’t whether a creature
can see you when you’re hiding. The question is whether it can see you clearly.
That's... even more unhelpful.
The way hiding rules work in 5e is convoluted, but essentially when you try to hide from someone, you need to first argue that they can't see you clearly. This definition is not spelled out anywhere in the PHB or DMG, so this is a judgement call that the DM has to make. The PHB does give you some guidance (mostly in the rules of obscurement), and it does mention that:
An invisible creature can’t
be seen, so it can always try to hide.
So you know that at one end of the scale (perfectly visible) you cannot hide, and at the other end of the scale (invisible) you can always hide. The DM has to decide where the intermediate steps fall.
To circle back to your main question, knowing where someone is doesn't actually do anything as far as the 5e rules are concerned for hiding. The rules state that:
If you are hidden—both unseen and unheard—when
you make an attack, you give away your location when
the attack hits or misses.
This is the only guidance you're given about what a creature knows about your location when hidden. So, once you make an attack, you immediately give your position away. However, there is nothing in that passage that modifies the behavior of the 'hide' action. Specifically, as long as the enemy cannot see you 'clearly', you can attempt to hide.
In your situation, your rogue can fire their arrow, and the enemies immediately know where it came from. Then, as long as the rogue cannot be seen 'clearly' by the attackers (ducking behind a corner, a box, or even just staying in the same shadow they were in before), they can hide again, even if they don't move and hide in the exact same spot. This can be continued forever, there is no limit to the number of times anyone can hide in the same spot. As long as the rogue is not clearly seen by his or her attackers, they can just continually make sneak attacks from the same hiding spot.
This is not what you asked, but as an aside I would caution you against making it too difficult for the rogue to get their sneak attack (even in seemingly cheesy situations like this). The rogue class is balanced around always having sneak attack for every attack; without sneak attack the rogue is extremely weak in combat and can contribute almost nothing. Do not be worried about your rogue getting sneak attack constantly in combat, because if they're not getting sneak attack at least 95% of the time then they'll probably quit out of frustration.