I guess if the UPS flick over to battery power fast enough is might of stopped the damage.. Like nothing will protect you from a A direct lightning, but you have to be very unlucky to be hit from a direct strike. Someone told me with surges, the surge gets weaker when enters your home, so a UPS might be fast enough to flick over to battery mode before it causes damage?
If that speculation was true, then numbers could exist to explain it. Destructive transients occur in microseconds. UPS takes tens of milliseconds to respond. Clearly it cannot switch fast enough.
Furthermore, did you really think a millimeters gap in that disconnecting switch would stop what three miles of sky could not? More numbers that expose the myth.
A basic electrical concept is taught to first year engineers - superposition. To a destructive transient, the battery is nothing more than a short circuit. You have no reason to believe a battery does any such protection. But again, many make assumptions rather than learn significant concepts such as normal mode and longitudinal mode currents.
UPS is temporary and 'dirty' power so that unsaved data can be saved. 'Dirty' because protection already inside all electronics is more robust. Your concern is the rare and destructive transient that can overwhelm protection already inside all electronics. No UPS or adjacent protector claims to protect from that type of transient. A 'whole house' solution (that costs tens of times less money per protected appliance) does that protection.
Any protection solution that does not protect from direct lightning strikes is bogus and often a profit center. Routine for over 100 years was direct strikes without damage. Your telco's CO suffer about 100 surges with each storm. How often is your town without phone service for four days after each thunderstorm while they replace that $multi-million computer? Never? Because direct lighting strikes without damage has been routine anywhere that basic electrical concepts (and not magic box protectors) are employed.
Electronics atop the Empire State Building suffer about 23 direct lightning strikes annually without damage. But due to myths promoted by near zero plug-in protectors, many only assume nothing can protect from direct strikes.
Any protection a UPS or power strip might provide must already be inside electronics. Concern is for a transient (maybe once every seven years) that can overwhelm that existing protection. Informed consumers properly earth a 'whole house' solution. Even the 'whole house' protector is not found in some systems. But every effective protection system concentrates on THE most critical component in every protecton system: single point earth ground. A protector is only as effective as its earth ground (that power strip and UPS protectors do not have and will not discuss).