An interesting question is, will SBP liquidate these reserves before defaulting or default while preserving the reserves, if and when it comes to it? The costs of default are higher than loss of gold reserves, but the psychology of gold is such that SBP may default first instead of liquidating its reserves. BTW, though it is a lot of gold, it is only $4 Billion. Not a lot for a country of Pakistan's size.
That is the only thing that pakistan has left. They are already in default. The selloff will occur soon and rapidly and the total repayment for debts PK has to make this year is $22b. Not all loans can be refinanced and creditors would be unwilling with its reduced credit rating.
As you said its less than $4b in value so it is not a solution. I would probably take the impact of default and keep the reserves. PK and its people are used to economic mismanagement and regular defaults.