The former Alaska governor, once the standard-bearer of the G.O.P.’s dog-whistling, no-apologies culture, was no match for the same forces she rode to national prominence.