Hitpoints are a popular abstraction to represent injury to creatures. Their simplicity makes them easy to use, but the abstraction differs from reality in some obvious ways. Characters usually perform at full capacity as long as they have any hitpoints left, so a character can be stabbed several times without being impaired, but the last stab knocks that character unconscious.
So let’s give that strange behavior a diagetic explanation. How can a creature keep going at full power with an arrow through its body? Surely vital organs were punctured, or important muscles were torn. Not if the creature does not have organs or muscles! I propose creatures made of homogeneous, shapable goo. If their bodies are bashed, pierced, or otherwise disrupted, they can reshape themselves around the damage. Since they can reshape themselves, let’s allow them to shape themselves to imitate other forms. Thus, silly putty dopplegangers.
So at full hitpoints, a doppleganger looks like a normal humanoid. As it takes damage, it is visibly damaged, but is mechanically unaffected, like a clay sculpture dropped and quickly reformed. When it runs out of hitpoints, it’s mashed into a formless lump. When a doppleganger regains hitpoints, its form regains detail.
Some fun optional things:
When a doppleganger rests & heals to full, it chooses a new form to imitate. It can imitate a generic humanoid, or a specific person that it has studied.
One doppleganger can transfer hitpoints to another by removing a chunk from itself and adding it to the other. Will this lead to doppleganger parties forming Voltron? That might be cool.
Dopplegangers can intentionally flatten themselves to squeeze through small places.
A doppleganger can conceal small items or weapons by jamming them inside its body. Retrieving an item from inside its body is slower than retrieving an item stored in a bag or on a belt.
A doppleganger can intentionally splatter when falling or being crushed. It takes half damage, but must spend its next turn reforming.