This is really dependent on the company. Musk, Brin etc. have not been canned due to some combination of corporate culture and stock ownership structures.
Famously, Mark Hurd was fired for this, but immediately hired by Larry Ellison at Oracle because he didn;t give a shit.