I wouldn't expect to see that in a village match. Perhaps at school I would.
The same would apply to a non-striking batsman walking out his crease as the bowler steams in & whips off the bails. Technically, it's out, but.. it's just not in the spirit of the game to do this; IF the batsman repeatedly does this -in order to gain an advantage- the bowler should stop, & warn the batsman. Umpire notes it.
Bairstow was not aiming to gain any advantage. That's the nub of this. The Aussies should've warned him, then the Cummins (if he was a man) should've retracted the appeal & continued on to win within the spirit of the game, &, would have garnered huge respect for the rest of his career.
Cheating desperate schoolboys instead.