To be honest I don't think balance is a major issue with combination weapons.
Any combination weapon is likely to be Martial in 5E, so that already limits it to certain characters. On top of that, it's likely that the "secondary" usage of the weapon is probably slightly less efficient than actually using a weapon designed for that. Like I'd expect the range to be a bit shorter, or to it be 1 die lower in damage, or to have a slightly annoying characteristic or whatever. Even if it doesn't, most groups don't track the free action it usually takes to change weapons, so it's not really doing much with the action economy. There are games where freely being able to switch between two weapons would be huge - 5E isn't one of them.
If we're talking like a gunblade, I'd expect it to be a martial weapon, which was maybe a longsword or greatsword stats-wise primarily, but also had a short-ranged version of a pistol mounted in it, for example. Just knock 10' off the short range or whatever so it's not a total no-brainer (depending on what source you use for your pistol stats, and presuming other characters can get pistols and so on).