Lichess tactical exercises are generated with code using games on the site and Stockfish.
Sometimes they are not very accurate. The exercise you mention is one of those I downvote because even Stockfish gives an advantage for white, it doesn't earn material enough to consider the game won. If I were analyzing this game with my oponnent I would say as black "I am better. I have the bishop pair and white cannot castle easily while I am castled and developed". But I think the goal of the exercises is to have a winning position or a draw in disadvantage, not a better position that takes long to convert into a win.
For example, this exercise wouldn't pass the chesstempo filter, as said in his FAQ.
I have made a play that I am sure leads to a won ending, but it is marked as wrong. Why is this happening?
Making plays that do not lead to a short-term material advantage, but instead require playing a long and drawn-out finish before the material advantage is realized, can be risky in the tactical problems of Chess Tempo. The program may not have been able to look far enough into the future to see that the ending leads to a position with a material advantage, and therefore your play may score less than it deserves. As frustrating as it is, this seems reasonable, given that tactical problems are all about finding combinations, not long-term victories in an endgame. To avoid losing points in these situations, if you see a solution that you think you win because it leads to a long, won ending, perhaps you should think about looking more carefully for a faster tactical solution.
When exercises are downvoted they are removed from the list so remember to downvote this kind of exercises that don't lead to a clear advantage.