The senator is elected to the senate, party affiliation is not a requisite. If a senator is evicted from their party they just become an independent senator.
Note: I’m assuming this is how the Aus Senate works, as it’s probably similar to any other western democratic parliament.