Tax is only calculated and added when the Merchant Facility has a How to calculate tax
On the Payment Txn, there are two fields for purchased amounts. These are the "Amount" field and "Donation Amount". If Tax Calculation is used it is ONLY every applied to the Amount field.
The Checkout uses Amount when the "Payment Form" field "Payment Type" is NOT "Donation".
The Checkout uses the Donation Amount field then "Payment Form" field "Payment Type" IS "Donation". It also uses this field when the "Payment Form" field "Enable Donation With" is selected - i.e. the person using the checkout form can optionally specify a donation amount, for example an Event Ticket or Membership with Donation.
The reason why some Payment Forms may be calculating Tax and others are not is likely due to the field "Payment Type" on the "Payment Form" being set differently.