While I don’t agree with your sentiment, one technique you can use is to attempt to move behind the ranger when this happens. If they’re channelling rapid fire while moving, the character generally won’t auto-adjust to your new position if it ends up being behind them, so it can forcibly stop the ability. This can be achieved with something like shadowstep if you’re still a distance away from them.
Although I think if the ranger stands still while doing it, it will auto-adjust to your position in a 360 degree arc. There seems to be inconsistencies on which abilities will do that and which won’t, so I can’t be sure off hand.
Or you could always use something like dagger storm or smoke screen, but now I’m asking people to make changes to builds, and that of course is wrong since no one should have to change their build to adjust to particular situations.