I am under the impression that after having KO'd Zacian/Zamazenta, it may be encountered again once rebattling the championship cup trainers & champion, and after credits, then perhaps we go back to the tower summit where it will be respawned. Please validate.
Okay CreatineRealLife, here's your answer.
No need to panic, Zacian/Zamazenta shouldn't despawn at all should you accidentally defeat it. The battle will end with a text box displaying "Zacian/Zamazenta was testing you", and you'll be able to re-battle the Legendary Pokemon as many times as you'd like.
Source
Hope this helps!