Have this problem aswell, one of the most annoying bugs, its not that they have 1hp left, you can hit them with a strong attack and they stay alive no matter what, happens to me when I am against NPC trainers. and have lost a couple of matches because of it. I understand that some pokemon have abilities like sturdy that keep them from dying, but the problem is pokemon with no hp left that dont faint and you have to hit them again to finish the battle. Its a bug thats most likely taking the abilities like sturdy and its being added to trainers pokemon by mistake.