The GOP victory came in a state President Biden won by 10 percentage points, sending a warning to Democrats about their midterm election prospects.