I think swapping between weapons should be allowed for free, but locked after you make an attack.
That would give you the option to assess your melee and range choices and then commit to one.
Granted there still going to be an inherent advantage that is given to casters. For example a Cleric can't have a shield and mace out and cast Sacred flame - for that they need to have a free hand.
But I think that that would be a reasonable compromise.