This was the special election to replace Don Young after his death. Peltola will occupy the seat till next January depending on who wins November's election.
The special election used ranked choice voting. Begich got third place and his second choice votes were dispersed. Apparently many of his votes didn't list a second choice, and were exhausted. Hence Palin was unable to make up sufficient ground to win. Palin was not very popular.
Cook Political Report now has shifted Alaska's at-large seat to a toss up.