Tesla has struggled amid Elon Musk's move into politics as he forms part of the Donald Trump administration.