Reporting or Clearance failed due to xml validation

I am generating the xml file and sending to zatca for report or clear. But due to data inconsistency it failed. But the Invoice Counter Value increased and another invoices issued. So what happen about this failed invoice?

actually it suppose to be like that
also for hashing if one invoice is rejected by code 400 , this rejected invoice hash will be used in the next invoice as PIH