We have identified and resolved the problem. The issue was related to Item Order breaking due to missing logic when copying invoices or quotes, automatic invoice creation from recurring tasks via cron, and the process of forcing a recurring task into an invoice.
The issue has been successfully addressed and you can find the solution here:
Link to the resolved issue
The pull request mentioned by @Bigbug was specifically designed to correct the logic for converting quotes into invoices. Please note that this fix applies to all future invoices and quotes, but it does not affect existing ones.
To resolve the issue for your current invoices and quotes, you will need to manually update the database table data. This can be accomplished by referencing the invoice or quote ID and adjusting the item order field to ensure consecutive numbering (starting from 1, 2, 3, and so forth).