In my opinion, damage = 0 is not damage :)
In general, everything is clearly stated in the rules:
<<5.6. Hit-and-run is prohibited: the attacking hero is not allowed to retreat in the first round of combat if they used combat magic or any other magic that, in one way or another, inflicted any damage to the opponent. This prohibition does not apply to a hero who is defending.>>
a) the opponent cannot retreat if they used combat magic
b) the opponent cannot retreat if they used any other (non-combat) magic that, in one way or another, inflicted any damage to the opponent.
Otherwise, the conjunction "AND" should have been used.
The most important thing is that this interpretation absolutely ensures the goal pursued by this clause, that is, to prevent fleeing when using any combat magic (regardless of whether it worked), but regarding the rest of the spells, clarification is needed, since, for example, Berserk can inflict damage to the opponent without using its own units.
Added after 21 minutes
I don't want to offend anyone, but I'm very concerned that most of the controversial issues regarding the rules on this forum have already been discussed and broken down on other sites a long time ago.