Most resistances and immunities have a way to bypass them already.
In many cases a way of bypassing a resistance or immunity is already defined in the resistance or immunity. Resistance against bludgeoning piercing and slashing damage is usually restricted to nonmagic weapons. Sometimes it is further restricted to nonmagic or non-adamantine weapons (e.g. Devils, Lycanthropes, Gargoyle). Getting magic attacks or silver weapons and so on will bypass the feature.
There are few creatures with resistance or immunity against bludgeoning, piercing, and / or slashing without such a bypassing mechanism in the MM:
Resistance: demilich, treant, awakened tree, swarms (6 instances),
Immunity: Black Pudding, Ochre Jelly
There is the vorpal sword.
The vorpal sword (DMG p. 209) states:
You gain a +3 bonus to attack and damage rolls made with this magic weapon. In addition, the weapon ignores resistance to slashing damage.
There is not a balancing problem per se.
Some classes already have features that make their attack magical, such as the artificer's Infuse Item, the monk's ki-empowered strike, and the the warlock's pact weapons. These will bypass most instances of resistances and immunities as stated above.
Furthermore, the feature of bypassing resistances is very situational. It will do nothing when the monsters do not have such resistances / immunities. Compare that to other class features which will more consistently increase damage such as the Barbarian's Rage, or the ranger's Colossus Slayer. Those will generally deal more additional over average combats against different types of opponents. It is true that the damage is potentially drastically increased against the right kind of opponents. But similar features (in that way) exist such as the ranger's Favored Enemy. In the end, the impact of the feature strictly depends on the opponents that are presented in the campaign.