Will the inventory be updated if I edit an order after order creation?

When an order is made, I am trying to replace a product with several products. I guess I will probably use order creation webhook and order edit API to do so.

As far as I know, Shopify deducts the inventory when the order is paid. Suppose I use Shopify to track inventory. When I remove the product and add new products, what happens to the inventory? Will the new products be deducted or the old one?

Also, will the customer invoice be affected? Is it listing the old product or new products?

SPO - SEO App to research keywords & edit social link preview