Automatic Cost Post is not working on Sales Invoice Post

Setup on Inventory is Set as Automatic Cost Posting [Yes]

On Item Unit Cost = $0 , Direct Unit Cost = $100

Steps Create new Sales Order → S1 with Item wrhich we are producing.

so Created Production order and consume component required and released production order.

Now posting Sales order with Ship and Invoice.

Which created Item Ledger with

1 consumption

2 Output

3 Sale

But it did not posted cost to G/L on Output and Sale Value Entry.

have you selected it to post for Always ?