In S/V your Pokémon will sometimes survive a KO with 1 HP. The message is insert Pokémon name toughed it out so you won't feel sad. What are the odds of this?
This all depends on your affection level with your Pokemon. It starts at affection level 3 with a 10% chance 15% at level 4 affection 25% at level 5 affection This is for gen 6-7
Though you want SV so it depends on your friendship level. If you have a happiness value of 180-219 your Pokemon has a 10% chance to tough it out 220-254 has a 15% 255 happiness has a 20%
More details here: https://bulbapedia.bulbagarden.net/wiki/Affection https://www.serebii.net/scarletviolet/friendship.shtml