Are you sure that China makes exactly same medicine? What if some cancer patient is on Indian medicine and suddenly he is asked to use chinese brand. Would you be fine with it? Secondly, Indian medicine ia cheaper than Chinese. India has makes its own API and manufactures the molecules which combined with cheaper Indian labour and lower shipping cost to Pakistan, Indian medicine is at least 30-40% cheaper than Chinese.
Pakistan can import medicines from India, China, USA and few EU countries like UK. But India is far cheaper than all other options. So, unless Pakistan wants to ruin its its finances, it has to import Indian medicine. Pakistan can always import from USA, China at a higher price if India refuses to sell.
Pakistan has pharma industry for making pharmaceutical tools like injection, surgical blades etc and they sell well internationally due to low Pakistani labour cost. But Pakistan doesn't have medicine making industrial infrastructure. There isna difference between making medicinal molecules and making medical instruments.
Developing the complex industry of manufacturing medicine isn't simple that just by restricting imports, domestic industry will grow.
There aren't many countries in the world which can make medicine. USA, China, India, Russia and some EU countries are the only ones who have major medicine manufacturing industry. This is not something that is easy to make and requires lot of research for decades and expertise. Even countries like Iran, which has been trying to indigenise everything for 40 years, depends on medicine imported from outside.
The number of countries selling medicines are in single digit. India is the cheapest amongst all. You can get anything cheaper than India only when a country with lower labour cost makes the medicine. But medicine industry is complex and is of high end technology. Hence the smaller or less advanced nations don't have the ability to manufacture them. So, Indian medicine remains the lowest cost medicine in the world. Only transportation cost and political barriers (treaties, tariffs) can make Indian medicine more expensive than other option