What makes Pep "the best" is he fucks up a lot less than other managers...but he still fucks some things up...
Yes, it's inevitable that he makes mistakes. Because football may seem to be a very simple game, but it involves too many variables and trade-offs that are hard to calculate: say, if you play a defender in midfield, then, on the one hand, you can stop attacks already in the middle of the park, but, on the other hand, you may suffer more dangerous counters, etc. There are such tactical trade-offs from the keeper to the striker, and many more, related to individual qualities. Nobody can know in advance whether certain decisions are going to work.
Also, sometimes bad results have little to do with tactics and personnel and are down to personal mistakes, chance and refereeing errors. When Pep was preparing the tactics for Chelsea, he took into account that they concede many chances and goals (4 vs Liverpool and 4 vs Wolves!), and didn't take into account that Haaland might be completely wasteful, as the latter was improbable. Our xG was about 3,5 which is usually enough for 4-5 goals.