Don't know the cause, but we do encounter this situation also.
If you look at the "Cost of Goods Sold PREPOST Report" generated by SO-G, you will notice that DBA is assigning a sales value to item(s) that were not released on the sales order for this specific invoice. (this is the reason for the difference in $ amount of the invoice)
What we do, is to 1st) unpost the invoice generated by SO-F, 2nd) Edit the Sales Order to reduce the qty to 0 pcs and sales price to $0 for the part number(s) that DBA is including on the Cost of Good Sold PREPOST REPORT.
This usually fixes the problem and we can go back to SO-F and SO-G to process and post the sales invoice.