Elon’s close association with the Trump Administration has not been the best thing in the world for the Trump brand; I can see the market seeing the end, or at least weakening, of that association as a positive move for Tesla.
I tend to believe that, while this may be a slight overstatement, the damage will take more time and effort to mitigate than it took to create, but even so, the market likely has priced in Musk continuing in his current role and extending the damage, so from that perspective a bounce back when it appears that the end of that is near still makes sense.