I mean no one had his tongue farther up the golden hole than Elon and look where that landed him. The donation and inauguration appearance was probably to avoid some - not all - consequences.
Hell, you have Jared Isaacman, who also donated $1 million to Trump's inauguration to show some support, hoping to become NASA admin (for which he'd have been an uncharacteristically decent choice, being someone with a genuine interest in aerospace, and not having been all that outspoken politically).
Only for Trump to throw out the nomination as part of his falling out with Elon, saying Isaacman was a democrat.