The endorsement comes as Republicans face electoral setbacks in key races, including New York City, Virginia, and Cincinnati.