What is the longest forced mate optimally played in documented competition? 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.
I discovered a game from a few weeks ago features a forced mate in 13 moves that was actually played out on the board.

The game in question is Dubov-Svane, and the claim for the mate in 13 comes from Agadmator’s analysis video of the game.

Testing the given position with the chess.com engine yields a mate in 13, so Agadmator is correct. But Black made a mistake in the real game, shortening the game, but overall, it is still a forced mate in 13 moves in my opinion.

What Black should have played is included as a sideline.

[Title "Daniil Dubov-Rasmus Svane. European Team Championship, Batumi, Georgia, 10/31/19"]
[FEN ""]
[startply "58"]

1. c4 e6 2. Nc3 d5 3. d4 Nf6 4. Nf3 Be7 5. Bf4 O-O 6. e3 b6 7. Qc2 Ba6 8. O-O-O dxc4 9. Ng5 Nc6 10. a3 g6 11. h4 Bd6 12. g3 Qe7 13. h5 e5 14. hxg6 hxg6 15. Bg2 exf4 16. Bxc6 fxg3 17. Kb1 Rad8 18. f4 Bc8 19. Rde1 Kg7 20. Nd5 Nxd5 21. Rh7+ Kg8 22. Rxf7 Rxf7 23. Qxg6+ Kf8 24. Qh6+ Rg7 25. Bxd5 Ke8 26. Qh5+ Kd7 27. Qh3+ Ke8 28. Qh5+ Kd7 29. Be6+ Kc6 30. Qf3+ Kb5 31. Bxc4+ Ka5 32. Qd5+ Bc5 33. b4+ Ka4 34. Qg2 (34... Bf5+ 35. Ka2 Rd5 36. Qxd5 Qd7 37. Qb7 a5 38. Ne4 Bxd4 39. exd4 Bxe4 40. Qxe4 Qf5 41. Qxf5 axb4 42. Bb3#) Bxb4 35. Qc6+ Kxa3 36. Bb3 Bd7 37. Qc1+ Kxb3 38. Qc2+ Ka3 39. Qa2#