In some states that elected Democrats, voters also approved measures to restrict transgender athletes, require voter identification and toughen prison sentences.