Do KO'd Legendary Pokemon Respawn?
No, this feature does not return.
However, both opportunities to catch a Legendary Pokémon are part of the story. The first encounter will be a Max Raid Battle, during which you will faint the opposing Pokémon and be given the opportunity to catch it without failing.
After the main story seems to end (the credits roll), and after defeating the equivalent of the Elite Four, you can follow another short story. This story will lead to the final Legendary Pokémon. This battle is more conventional, so you can actually KO your opponent without catching it. However, you will have a Master Ball available, so you should use it straight away.
I've listed the Legendary Pokémon encounters below, but beware of spoilers!
The first encounter:
The first encounter, which is the Max Raid Battle during the Champions Cup Finals, is against Eternatus (the "third" Legendary).
The second encounter:
The final encounter, after the Champions Cup, becomes available after obtaining the Master Ball from the professor. You first battle the other version's mascot (and defeat it), and finally you will battle YOUR version mascot. Note that you cannot catch the other version's mascot; so don't waste your Master Ball!
I have KO'ed Zacian in my copy of Sword about a dozen times, so far, and he never leaves. I have even left the area where he is and returned to a Pokemon center to grab more Pokemon that had been stuck in poke jobs and am level grinding on him, right now.
For curiosity, I just saved my game and caught Zacian in a Premier Ball (my favorite PokeBall) and it was a tough capture; I had to use about 25 balls before it would stay in the ball (paralyzed and at low health, then 1HP). So, it's a tough catch, by all means, but as far as I can tell you have as many attempts as you want. Now I'm gonna reset and go back to grinding. I'll update the post if I ever encounter a limit to the number of times I can face it.
*Final KO count: 66 times, caught it on the 67th.
Eternatus is a guaranteed capture, effectively at the end of a Max Raid battle, though, so I see no reason to not go ahead and catch it in whatever ball you want (I used a Premier Ball for this one, too).