I'm not sure whether this is a bug or a feature. To reproduce:
- Create an order with a Payment Method that needs Capturing of Invoices => Orderstate is "pending"
- Create the invoice in "pending" state. => Orderstate is "processing"
- Create a Shipment for the order. Orderstate is "closed" (Why??)
- Capture the Invoice Orderstate is "Complete"
Why is the Order state in step 3 changed to closed? This makes no sense. In Magento 1 the state stayed in processing after step 3 and changed to complete after step 4.
I'm currently on Magento 2.3.2