506.4e
A permanent that’s being attacked that is both a planeswalker and a battle is removed from combat if it stops being both a planeswalker and a battle. If it stops being a battle but is still a planeswalker, it is removed from combat only if it is not controlled by its protector. If it stops being a planeswalker but is still a battle, it is not removed from combat. It continues to be a battle that’s being attacked.