Say that two players, likely lower rated, are playing a rated tournament over-the-board game. Player A has a winning position, and then blunders a move and stalemates. Player B, misunderstanding the position, does not realize they are in stalemate, and immediately resigns as they believe they lost.
The game is currently a stalemate, but Player B has resigned—what is the result of the game? Can you resign in a stalemated position? At a deeper level, what is the technical point at which the game ends and the result is final: the material position of checkmate or stalemate; the players (or arbiter, if need be) agreement; the clocks stopping; or the placement kings in the middle of the board?
If this question depends on which chess organization the game is played under, while treatments of any chess jurisdiction would be useful, I’m particularly interested in USCF and to a lesser extent FIDE.