Hello,
Please check box "Material direct" to the line where you assigned your cost element.
This allows the system to transfer the material directly to your sales document.
Please also make sure that the 'Material' is switched on as a relevant characteristic.
We add such item 'Material direct' option normally as a last line in the Material determination.
Please try once with this setting.