You are talking about move 22 Kh2 and how you chose between Kh2 and Kg2. One way led to a king walk. The other kept you even if you found some more good moves.
The question ⁉️ is whether or not you foresaw any of the main variations. It doesn't appear to me that pigs on the 7th or Karpovian bishops had anything to do with the choice.
Fortunately, your opponent threw away his bishop on his next move.
https://www.chess.com/analysis/game/live/5900430255?tab=report
https://www.chess.com/analysis/game/live/5900430255?tab=report My interpretation of the brilliant Kh2 isn't so much in the move itself as it is the stark discrepancy in king safety given the alternatives. My objective is to stop as many checks as possible to complete my attack (Pig on the 7th, Karpovian Bf7 Blockade, light square control). Granted, I didn't have to allow Q+, but I believed my attack more than I did the simple check.