You can avoid syncing out-of-stock items to ShipStation by changing the sync mode to Fulfillments instead of Orders. Once set to Fulfillments, we will only sync the Packed items in the Shipment of the Sales Order, rather than all the items on the order. This way, you can only create a Shipment for items in stock, which will then sync over to ShipStation. In addition, you can automate the process of creating Fulfillments and packing items that are available using Commerce Automation.
Click here to refer to the QuickBooks Commerce and Shipstation Sync guide.