Earlier quoted context omitted.
Based on his timeline I think he was ready to leave anyway. I’d bet that he’ll have a new job long before Musk can find someone equally skilled willing to put up with him - fanboys are unlikely to be as good at coding as they are kissing up.
If that's true, it's even more unprofessional. Agree to disagree is a basic professional skill. If you don't have that, maybe Elon was right to fire him?
Personally, I’d view this as a litmus test: if your boss is more concerned about scoring points with his sycophants than being right, most highly-employable engineers are going to walk before it gets worse. If Musk had been humble enough to treat this as an engineer would, that’s be a different story since it would tell you that improvement is possible.