It's a stalemate because as soon as the farmer grabs the shotgun to beat it up, they both cease to exist and become a new being: farmer with a shotgun.
But shotgun without a farmer wins because it was the active actions of the farmer without a shotgun which causes the stalemate state to occur, therefore he loses due to forfeit.