~
Pakistan has a little advantage in both innings.
They have performed well in every match, but in this one, they were reckless, and Bangladesh won. Pakistan leads slightly in both innings. They had performed well in every match, but in this one, there was carelessness, which led to Bangladesh's triumph.
In which innings Pakistan had an advantage, they failed miserably in both innings and they were trying to catch up with Bangladesh and ended up failing big time.
Can you clarify which match you are talking about since you are claiming that they played well, are you even talking about their Bangladesh tour. Last 3 Test matches against Pakistan, Bangladesh won, so it is not just a careless performance that led to their defeat, it is constant good performance by Bangladesh.