The Cost of material should be a PL account while WIP should be a BS account.
During the project execution, cost and revenue are posted to BS account and when you close it, the PL is hit. This also depends on the setup and configuration which you have done on Project group, parameter and line property.