Now that there’s a mod that changes this behaviour, time to raise this topic from the past as it’s relevant again.
Ironically the scab shooters (gas mask lasgunners) have a longer melee activation range than the scab stalkers, I’ve seen them charge across a room to engage in melee. Dreg and Scab stalkers will keep shooting you for an extra burst or two despite you hitting them with melee before switching to melee.