You can not make changes to the custom states values without changing the values in the database. Likely you were attempting to reference the custom state which is a list of invoiceItems and attempting to just modify the values of the invoiceItems but via the custom state value and not actually make changes to thing in the database.
Just use the values from the inputs within the repeating group to create the invoiceItems when the user is creating the Invoice.