I don't think 454 kg HE warhead of TASM can do much to a Yamato or Iowa. Battleship cannon can use HE round which weight 900-1300 kg but HE rounds are very ineffective in anti ship and they needed solid steel AP round to damage and sink each other
The weight of a battleship gun projectile is immaterial in this case. A complete APC Type 91 fired from Yamato's Type 94 guns weighs 1,460kg, yet only 33.85kg of that is explosive filling - the burster charge. Common Type 0 HE weighed 1,360kg and had 61.7kg of explosive filling.
AP projectiles work by sheer brute force by kinetic energy (hitting at 1,880km/h at 20km) with a small burster to make them fragment after penetrating through armour (the fuse is in the base). Without hitting an armoured bulkhead its possible for such a shell to pass right through a ship without exploding, leaving holes and secondary shrapnel but not in itself fatal to a ship unless it hits something vital (boilers, engineering spaces).
If we look at the Battle of Samar, Yamato hit the escort carrier USS
Gambier Bay and the destroyer USS
Johnston causing damage to engineering spaces and engines and causing numerous fires but not actually sinking either ship by herself (indeed most of Jonhson's armament and even her radar remained operative). Just shooting holes through a thinly skinned vessel is not going to make her sink.
All the Japanese battleships switched from AP to HE because the AP rounds were simply ineffective against the light ships they were engaging. The Japanese battleships got within 16km of the carriers but the result was disappointing (flatter trajectories) and by then the were engaging with their secondary guns anyway.
TASM trades impact velocity (half that of the shell) but has a much larger explosive force, I'm presuming TASM had a shaped warhead which would increase its effectiveness. Also, its a guided missile and very accurate, each one is likely to find its target.
Soviet supersonic SSMs restore the velocity balance in their favour, hitting harder than most battleships shells ever could and with more explosive content too.
In this scenario if an APC Type 91 hits a relatively unimportant part of the hull of Virginia there is a chance it would pass right through or partially explode. Damage would be done, certainly shock damage on electrical equipment would be a problem. If the shell hit the reactor or engineering spaces, it would certainly pierce that containment/armour and explode within the compartment and the ship would be in a dire situation pretty quickly. In her defence, Virginia is capable of 30+kts so is a fast ship and would be a fairly rapidly moving target, especially for Yamato reliant on visual rangefinding. For me, eight hits from TASM would likely cripple Yamato or seriously reduce her fighting potential and her crew's morale to fight, especially as Virginia could be 100+ miles away. Yamato has to be able to find Virginia to sink her and without modern radar good luck doing that (unless we're bringing spotter planes into this and even then I don't want to be a Aichi E13A pilot going up against an SM-2...).