Historical Rules · 23 July 2021
Rule 702.19e
Official source text from the 23 July 2021 Rules release
If a creature with trample over planeswalkers is attacking a planeswalker and that planeswalker is removed from combat, the creature’s damage may be assigned to the defending player once all blocking creatures have been dealt lethal damage or, if there are no blocking creatures when damage is assigned, all its damage is assigned to the defending player. This does not cause the creature to be attacking that player.