Why did the PN go with F-22P instead of 054A?
No one knows the true reasons. But using an educated guess, I think it's because of Pakistan's inferior industrial capabilities. Even if 054A was given to Pakistan as a free gift, Pakistan's industries still wouldn't be able to maintain and service it. Modern warships are no longer something as simple as a rifle or canon. Not just the sailors requiring years of training before they can fully wield the ships, the shipbuilding industry also has to be updated and extensively trained before they can service 054A.
Another factor would be the price. 054A is a least double the price and this is based on China's PLAN pricing (054A) and export pricing (F22P) to Pakistan. If you base both on the potential export pricing, 054A might be at least 250% - 300% that of F22P.
The biggest factor would probably be that of building indigenous shipbuilding industry. Like the Mistral class, half of the ships would be built by the exporter and the other half by the importer. This will directly boost Pakistan's shipbuilding ability. F22P is a lot smaller and simpler to build than the 054A, making it less challenging to achieve for Pakistan.