Donald Trump and Elon Musk’s preferred candidate lost, despite Musk dumping more than $25 million into the race.