It seems to me you are looking at this the wrong way. As you have described the situation, the 5% amount for VAT is simply advance remittance of an amount you would owe at your next regular VAT filing. It is still related to the VAT you have applied with a tax code to line items on the sales invoice. On the other hand, the 2% withholding against future income tax fits Manager’s definition of withholding tax, or tax withheld at the source. It is not related to any line item on the invoice. Both seem to be calculated on the same base in your first screen shot. (Your second screen shot is not helpful for understanding the transaction, since it is from a test situation.)
If I were you, I would continue to mark the invoice for 2% withholding. When the government pays the invoice, I would post the full amount receivable against the invoice to clear Accounts receivable. I would then add a second line item, entered as a negative number, posted to Tax payable to reflect the effective remittance of VAT represented by the government’s deduction of 5% from its payment (your receipt). This will make the total receipt equal to what you have received from the government, so your bank balance will be correct.
It appears the government is already expecting to perform its calculations on the full total of the invoice, including VAT. So this approach should not present them with any difficulties.