You misunderstood what I was saying. You must be thinking of a different scene.
Sure, I understood what you were saying before. However that relies on M5 unable to properly scan Excalibur. The examples you listed had very specific interference (alien vessel disguised as an asteroid, unusual radiation and/or shielding) that wasn't addressed in "The Ultimate Computer" and/or M5 would've called out such a difficulty as an excuse to not take responsibility for the deaths on the Excalibur. Kirk could've easily called out any number of casualties inflicted up to that point but he picks on the Excalibur.
CHEKOV: Excalibur is maneuvering away, sir. We're increasing speed to follow.
SULU: Phasers locked on.
SULU: Phasers firing.
DAYSTROM: I really don't know how to get to the M-5. I really do not know.
SPOCK: Doctor Daystrom, you impressed human engrams on the M-5 circuits.
CHEKOV: Coming to new course, sir. Bearing on the Potemkin.
[This is where Hood and Lexington could've started their rescue operation using Potemkin as bait.]
SULU: Phasers firing. A hit.
WESLEY [on viewscreen]: All ships damaged in unprovoked attack. Excalibur Captain Harris and first officer dead. Many casualties. We have damage, but are still able to manoeuver. The Enterprise refuses to answer and is continuing attack. I still have an effective battle force and believe the only way to stop the Enterprise is to destroy her. Request permission to proceed. Wesley, commanding attack force, out.
Since Wesley reports to Starfleet after Enterprise goes after Potemkin with casualty information regarding Excalibur, it is likely they rescued the remaining survivors off of the dead ship prior to retreating outside of phaser range.