Elon Musk emerged unscathed after Democratic-led states withdrew a sweeping lawsuit challenging his role in DOGE.