Issue with Tax Exemption for educational activities

I am facing an issue when setting Tax Exemption for educational activities. My activity is classified as educational, and I was previously using:

setTaxExemptionReasonCode(‘VATEX-SA-32’)
I updated it to:

setTaxExemptionReasonCode(‘VATEX-SA-EDU’)

to ensure that Saudi citizens are exempt from VAT. The current code in my project is:

$taxSubtotal = (new TaxSubtotal())
    ->setTaxCurrencyCode('SAR')
    ->setTaxableAmount($amount)
    ->setTaxAmount($vat)
    ->setTaxCategory('Z')
    ->setTaxPercentage(0)
    ->setTaxExemptionReasonCode('VATEX-SA-EDU') 
    ->setTaxExemptionReason('Saudi – no VAT applicable')
    ->getElement();

$itemTaxCategory = (new LineTaxCategory())
    ->setTaxCategory('Z')
    ->setTaxPercentage(0)
    ->getElement();
After this change, the system returns a HASH issue when submitting the invoice.

I would like to confirm the following:
Is VATEX-SA-EDU the correct code to use for educational activities?
Does this change cause the HASH problem, or is there an issue with how TaxSubtotal or LineTaxCategory is configured?
Thank you for your guidance on resolving this issue.

It would be preferable to attach the exact error you are encountering, as it appears to be unrelated to the exemption codes.