You're looking for a bright red line that really isn't there, so chill out.
The spells in question here really don't say they grant you an attack with your melee weapon
Explicitly in the spell description.
Both Booming Blade and Green Flame Blade say:
"You brandish the weapon used in the spell's casting and
make a melee attack with it against one creature within 5 feet of you."
(Tasha's, pgs 106 & 107).
If you are going to make a claim about what the rules say, please do the most trivial check to make sure you aren't incorrect. In both cases it was the very first line of each spell effect.
any more than it's forbidden to consider that attack with the focus of the spell as a portion of the somatic component.
Never said it was. I said it wasn't part of THIS spell. Some other spell could be developed that has that. And will list it. There are already spells that you can cast on a Hit, and spells you cast before and then go off when you hit. They have sigfnificantly different wording than this.
There's plenty of room for DM interpretation here where a DM could consider the "brandish the weapon used in the spells casting and make a melee attack" as part of the somatic component and thus the attack could proceed though the spell's magic enhancement is countered or the DM could choose to interpret it as you do.
I will apply this to other spells. Let's look at the first line of a few:
Cloudkill: You create a 20-foot-radius sphere of poisonous, yellow-green fog centered on a point you choose within range.
Conjure Fey: You summon a fey creature of challenge rating 6 or lower, or a fey spirit that takes the form of a beast of challenge rating 6 or lower.
Fireball: A bright streak flashes from your pointing linger to a point you choose within range and then blossoms with a low roar into an explosion of flame.
Mage Armor: You touch a willing creature who isn't wearing armor,
and a protective magical force surrounds it until the spell ends.
Each that I looked at has the description of a successful casting as the first line of the effect. None of them seemed to be descriptions of the casting.
A DM could say "this spell does not follow the pattern of the majority of other spells", but I don't believe a reasonable one would.
In addition, there are spells that take place due to action outside the spell, and they aren't worded like this. They have things in the Casting Time section.
All in all, this call for a DM interpretation doesn't pass the reasonable test.
It's honestly not all that big a deal which direction you go. I'd just recommend a DM handle it consistently for each case.
As said several times to Oofta when he kept repeating "it doesn't matter", the rules still exist regardless if you think they are a big deal.