Ranged enemy melee switch takes way too long

I have been in a multitude of situations where you close in on a ranged enemy or a group of them and they just stand there shoving bullets into your face. In all honesty, that’s probably what a real person would do, but this feels unfair and unfun.

The game also teaches you to close the gap so they’ll switch to melee in the tutorial, yet a lot of times they only switch to melee by the time I’ve already put something sharp through their skull.