Why does Stockfish lose against this piece sacrifice in the Berlin Defense? In a recent YouTube video, Jonathan Schrantz presents an absurd (?) piece sacrifice in the Berlin Defense, which Stockfish seems to vastly underestimate.
The engine evaluation shows around -4, until around move 20, when it &quot;realizes&quot; it actually is not even better and starts playing very weird moves. JS plays a live game against Stockfish on the strongest setting available on Lichess and manages to win.
I assume JS did heavy preparation with alternative engines, as the moves played are by no means natural. But what is really happening here? Is the piece sacrifice actually stronger than Stockfish initially judges? Or is it a bad position, that nonetheless manages to break Stockfish and makes it misplay? Is it due to the limited strength of the featured Lichess engine? Throughout the game, it seems to think that almost every move is still winning, but it actually does not predict the responses played by JS, which lead to a shift in the evaluation after being played.
Below is the game until White reaches a winning position, here is link to the video.
[FEN &quot;&quot;]

1. e4 e5 2. Nf3 Nc6 3. Bb5 Nf6 4. O-O Nxe4 5. d4 Nd6 6. dxe5 { C67 Ruy Lopez: Open Berlin Defense, l'Hermet Variation } Nxb5 7. Re1 a6 8. c4 Nba7 9. Ng5 Be7 10. Qh5 g6 11. Qh6 Bf8 12. Qh3 Bg7 13. Nc3 h6 14. Qg3 O-O 15. Nd5 Nd4 16. Ne4 d6 17. Bg5 hxg5 18. Nef6+ Bxf6 19. exf6 Re8 20. Qxg5 Be6 21. Nf4 Bf5 22. Re7 Bc2 23. Rae1 Nac6 24. Nd5 Rf8 25. R1e3 Nf5 26. Rh3 Bd1 27. Rh6 Qe8 28. Re3 b6 29. Nf4 Bh5 30. Rxh5 b5 31. g4 Qxe3 32. fxe3 Ne5 33. Rh3 Rfc8 34. gxf5 Nf3+ 35. Rxf3
Is it due to the limited strength of the featured Lichess engine?

Most probably it is the above.
Using the engine at lichess.org/analysis (which is Stockfish 13 NNUE, almost the newest version of Stockfish available), on move 20 its eval was -5.9 for Black and it recommended 20...Rxe1+. The move played, 20...Be6, cost Black a significant amount of its advantage (the eval dropped to -2.8), and 21...Bf5 caused another similar drop. In my analysis run, Stockfish 13 NNUE realized Black had lost its advantage as early as 24...Rf8 (0.00 eval). All the above analysis was at rather low depth of ~25, taking only a few seconds to evaluate for me.
I can't tell if JS used Stockfish 12 with NNUE on. If he didn't, it is over a hundred elo weaker than Stockfish 13 NNUE. I note as well that the analysis engine only ran to depth ~16 at most, which is a very shallow depth in engine chess today (it corresponds to searching only ~8 moves ahead - even human GMs can search further than that in some positions).