The rule is that if you intentionally throw at someone the umps can throw you out. You do it and you live with the consequences.
You gotta remember that Dusty had Graveman throw at Abreu in game 5 in 2021 cause Rodon hit Altuve early in the game. When it comes to enforcing their unwritten rules, guys like Baker and TLR don't care what the situation is.