Please double-check the field names. In the Sales Order, the field name is custom_test_field, while in the Sales Invoice, the field name is custom_test_field_. As you can see, an underscore (_) is added in the Sales Invoice, which prevents the data transfer. Ensure the field names are identical to facilitate the data transfer.
Don’t know how this happened but when I deleted that field and re-created it, it came back properly. Same field name is there in both Sales Order and Sales Invoice.
If I create this transporter information of delivery note in the same sales invoice then how will I achieve it in that case because the field names will be different.