There are tons of questions about the longest forced mate on here and other chess forums. Usually the answers are the 2 Knights forced mate and another one that evidently takes 549 optimal moves. Ultimately those discussions often devolve into debate about the 50 move rule.
However as a novice player it often boggles my mind when, in real games, players are able to recognize unavoidable checkmate on a non-empty board dozens of moves in advance. Hence, what I am wondering about is: what is the longest forced mate optimally played in documented competition? In other words, in competitive play (international, national, league, etc.), what comes to mind as the furthest time (in moves) from checkmate when resistance is futile? Something a la "that's mate in 15."
Edit: I imagine that this situation usually brings about resignation, so I should clarify that I'm not interested in if it was ever played out, but rather what the maximum number of moves was in advance of checkmate when this futility was ensured.