Pep is a wonderful coach, no doubt and one of the best in the world. That he lost the UCL finals to Chelsea does not change the fact that he's at the top of the game at what he does just that his only weakness is that he sometimes underrate other teams
Assuming Pep was to play the UCL final against Bayern Munich or Madrid, he would probably have won in the sense that he wouldn't have gone for such attacking lineup had he come against Neymar, Mbappe, Lewandowski or Benzema
Where he got it wrong was that he thought Chelsea would be the underdogs and they would sit back with more of defensive and less attacking ambitions, so he saw no reason to shore up his defense, but when he realized his mistakes, he brought in Fernandiho to help shore up the defense but it was too late.
At least he should have learnt from the two previous meetings that Chelsea under Tuchel don't play defensive football. Tuchel under Chelsea are attacking side
Anyway UCL is gone already another one is around the corner, and as said earlier, Pep losing UCL to Chelsea doesn't change the fact that he is the best coach in Europe currently.. He already has 10 titles n 3 EPL in just 5 seasons and such a feat is not easy to come by by any coach