Chief Justice John Roberts and Justice Amy Coney Barrett joined the three liberal justices in the majority