the first step to creating tax codes is creating the tax liability account.
if you are using the in-built default Tax payable account, you cannot post a payment to it.
so create a custom tax liability account and set your tax codes to this account.
read the guide below.
https://www.manager.io/guides/8901