If we think about Vincent Kompany when with Burnley and Bayern Munich, actually it's something unfair. From the competition for each league is very different and in a condition of the squad is also different. Although Bayern Munich has a much more professional squad, but there is something we don't know that makes Bayern Munich a little difficult to get back to get the bundesliga title.
As you said in the weak defense that is the main problem at the moment. Vincent Kompany has tried to improve these weaknesses and if they still have the same performance, Vincent Kompany must be demanded to find the problem and immediately fix it. Pressure like this that usually makes the coach difficult to find the right strategy.
the weakness of Munich's defense line is very visible. fortunately, their attack line is quite good so they can still score. but the imbalance that occurs on the field must be resolved immediately.
just look at the match against Wolfsburg, Munich scored 3 goals but also conceded 2 goals. looking at Wolfsburg's statistics they didn't get many balls but with every attack they made they created shooting opportunities. that shows there is a gap in Munich's defense.
if they were up against Leverkusen or Dortmund, maybe Munich would really have a hard time. I hope this is resolved soon in the Munich squad and they will really compete for the Bundesliga trophy this season.