Accounts in item group

Hi everyone,
I have set up the cost of goods sold accounts in the system for each item group.

However, it does not consider the items within that group, and it causes an error during the sales process, requiring accounts to be set up separately for each item.
Why?