Missing COGS and Stock in hand missing

hi, i am using V12, there are some invoices missing COGS and stock in hand GL entries, they just have debtors and income GL entries.
i checked everything but can’t find the reason, update stock is checked, items are stock enabled.
only some invoices are missing these COGS and stock, however stock ledger entries are being created fine.
anybody faced same issue?

please ensure update stock is checked(this is screenshot for v14, same feature in V12 too)

yes i mentioned and checked that update stock is checked already, if i am making duplicate for exact same details wihtout changing anything, its working fine.