Since catching Shiny Ponyta is required to complete “A Peculiar Ponyta,” players will get as many chances as they need to catch it. If Shiny Ponyta runs away or faints, trainers will have to return to Jubilife Village to get it to respawn, but it will reappear the next time they visit Horseshoe Plains. Trainers are guaranteed to get Shiny Ponyta in Pokémon Legends: Arceus as long as they pick up the Request, and Yato will even throw in five Razz Berries as a bonus reward once it's complete.
You will still get the shiny Ponyta. If you knock it out you just need to return to Jubilife Village and go back to the shiny Ponyta and it will be there.
Source
Hope I helped!