For context, a 14.5x114mm cartridge fires to about 1.5 miles; the more popular .308 Winchester cartridge only goes half a mile [1].
A 50 cal can go well beyond that the chances of hitting a man sized target are pretty slim that said it’s maximum range is 7000m hitting a space rocket sized target is quite possible at that range.
With bigger caliber rifles like the ones used for avalanche control you probably can get to 7 miles and beyond but those are effectively cannons at that point.
That said if you really want to fuck up a launch there are plenty of drones or RC planes that you could use to ram the rocket with or without an explosive payload.
Which is why they launch from a military base with arguably quite good perimeter security that goes well beyond the range of its fence.