That style specifically requires a ranged weapon to be used. Other ranged options that only say ranged attack roll work on ranged spells (e.g. crossbow master to not have disadvantage in melee)
That's still a problem. If you only allow it with ranged weapons, you create a massive damage disparity between casters and ranged martials. In this game damage is at a premium as the only way to truly win. Casters would fall so behind in the damage curve as to create a 50% or more damage disparity.