Democrats poured millions of dollars into the race in the hope of unseating Cruz