That is because your Trigger is focused on the Main data type and not the Invoice data type. Can’t expect a Trigger that is set to watch for Main to see a change to a separate data type, which is what your Invoice is, a separate data type. So deleting a separate data type (Invoice) will not trigger a database change set to watch for Main. However, the change to the Field of List of Invoices on Main should still be recognized as a change to the Main data type.
Maybe try to structure another Trigger that uses the conditional
When Main Now List of Invoices is greater than Main Before Changes List of Invoices
And another Trigger that uses the conditional
When Main Now List of Invoices is less than Main Before Changes List of Invoices
This way the triggers are listening for when the list of items count on the Field that is the list of invoices changes. Since deleting an invoice would subsequently remove it from the Field on the Main List of Invoices, it should work.
If it doesn’t send a Bug report to Bubble. I am currently trying to explain to Bubble support that their explanation for how the Trigger Custom workflow when data changes (on page action) doesn’t work properly when you listen for a Field which is a list of things.
Likely the Bug I am experiencing on the page action would be affecting the Backend workflow trigger action as well.