See my common sense rules say you shouldn't be able to do this unless you put some effort in. Lets say move somewhere unexpected before the attack. Otherwise its too easy. A rogue could do this every round, from the same corner using their bonus hide. And lets be honest, its only really a rogue that's going to bother doing this.
I'd rather take the stance that you can't do this by default but if you can convince me that the enemies are not watching the corner (distracted) then sure, why not
As long as there's enough hiding spots around, a rogue can do this without violating common sense. You get an action, a move, and a bonus action every round. If you use your action to make your sneak attack, then move somewhere, and use your bonus action to hide, you can basically flit around from hiding spot to hiding spot, sneak attacking from somewhere different every round.
The action economy enables rogues to pull it off. The hard part is having the hiding spots. Skulker, Wood Elf, and Halfling make that way easier.
I think the real problem with this sniping tactic is that once again "hiding" is not the same as getting behind cover, and is not the same as being unseen.
From the previous discussion, it seems implied that "hide" is what you do when you want to cause your enemies
not to know your location. So they don't see where your attack is coming from.
Getting behind a wall makes you covered (which has it own benefits, entirely defensive) and unseen. But they know where you are: you are behind that wall.
Now, once you're behind that wall, you may want to
hide if you further want to make it so that if someone walks behind the wall to reach you, they won't find you (because you're not only behind the wall, you are also hidden further somewhere there... provided there is also concealment or
another cover for you).
But sniping cannot be that easy IMHO. You have given away your location (behind the tree, behind the column, behind the corner, behind an ally if you're a Lightfoot Halfling...) when you did your first attack. You are going to attack again
from the same location. It shouldn't matter at all to make a Hide check at this point. You don't
need a Hide check to get back behind the tree/column/corner/ally, you only need to use 5ft of your movement, or even 0ft. But at the same time you don't
benefit from a Hide check because your location IS the tree/column/corner/ally, you've already made everyone aware of that, another Hide check cannot make them forget this information.
In the best case, I can imagine you may want to allow a "special" Hide check to
negate the possibility of someone to notice your location in the first place (when you reveal it by attacking). But by the RAW, this is automatic if you attack.