The key part of this question is managing expectations and adjusting, when our relative hand strenght changes significantly. Just because we have AA, does not mean, we have a license to print money. Against a single opponent AA will get cracked around 20% of the time, and the goal in poker is not to win the pot. The goal is to win chips. And for that reason we dont want to just move all-in, when we have the nuts, and chase away most of our action. Unless of course the stack to pot ratio is reasonable for moving all-in, and we would also do it with
hands, that are not the nuts.
But apart from such situations the hand is not over, until all 5 cards are dealt, and bad board runouts are just part of the game. Another situation might be, when we flop top set with red jacks on a board with two spades, and then the turn and river bring two more spades. In that situation we also just need to accept, that the nuts have changed significantly, and we no longer have it. If we are in position, and our opponent check to us, we check back and take a cheap showdown. And if we are out of position, we check, and maybe call a small bet to try to catch a
bluff. Or we check-fold, if we dont think, our opponent is
bluffing enough of the time.