A backlash over high prices helped Republicans capture a majority in 2024. Now, it may be the source of the party’s own undoing.