Some rulesets allow you to have a bonus if you take an action or move action to aim instead of moving.
I've added a house rule a few times where if you moved, you had either a malus or disadvantage on your ranged attacks. You either took the time to aim and shoot, or you skipped around and did a quick shot. It seemed to work, players didn't want to move and so they chose their position much more carefully.
You could also make it so if you move, you can't shoot. Or if you shoot, your movespeed is reduced. It forces ranged characters to eventually get caught by melees if they're getting chased.