Different hashes for same input

Hello, I recently integrated with ZATCA simulation

I noticed however that when I generate the xml from my json data and save it to a file
that the hash always changes.

Do we need to save each invoice XML before signing the invoice or just the invoice XML after clearance? or is it normal to get different hashes

Hash will change every time you create it for the same data, you suppose to save the original xml, and sign it, and save the signed one also