Even after the type 054A was upgraded to the type 054AG, which then solved the missile and fire control radar problems, the type 054A was still using the Z9 helicopter and diesel engine.
The Z9 was weakly armoured and lacked night-fighting capability, the diesel engine was noisy, and the type 054A's maximum speed was only 27 knots. This resulted in its anti-submarine capability being limited. This is the main reason why the Chinese Navy started equipping the type 054B.
The Pakistani Navy can replace the Aegis destroyer with the type 054AG. But in the future when India equips more advanced submarines(for example, the German Type 214 submarine), I think Pakistan Navy will still need type 054B.
Project 75 India Submarine Acquisition: A Comparative Analysis of Type 214 and S-80 Plus
navyrecognition.com
btw: Type 054B is a Chinese hunter reserved for type 214 and Sōuryū-class.