Vaidate Invoice through REST API Does not Decrease Stock

Hello friends,
I have used Dolibarr REST API to create and validate Invoices however Stock values are not being Reduced once i validate the invoice via this API. On the same setup when I create an invoice front End and validate it, stock reduces successfully.

Dolibarr version = 11.0.4