Exchange Rate Revaluation for bank with negative balance in company's currency

Hello. I’ve been dealing with a scenario with the Exchange Rate Revaluation. Maybe I’m doing something wrong. Would really appreciate it if someone could guide me or provide a solution to this, please.

For example.

I have a bank in Foreign currency (USD), company’s default Currency is PKR. I insert the opening balance as USD 5,000 @ 120 = PKR 600,000.

Posted some entries making expense payments through this USD account.

At closing time, I have USD 500 left in the bank, which amount to PKR 115,000 @ 230.

The USD ledger seems to be working properly, but PKR went negative after some transactions. When I try to revalue using Exchange Rate revaluation, the PKR amount is reflected properly but the USD ledger shows a balance of USD 1,000 when it should be USD 500 instead? Any ideas? I can post screenshots if needed.