He has always been an Independent who caucused with the Democrats in the Senate.
He just choose to run for President as a Democrat rather than an Independent. All he had to do was get his name added to the ballot as a Democrat in the states that held primaries etc.
As Thoreau wrote, “The question is not what you look at, but what you see.”