Issue on Subcontracting costing

Hello,
I have facing and issue regarding costing of subcontracted item.The rate of Raw material is not update/change as the new stock received. Let me explain with example.
Let’s say I have “A” product as raw material and “B” is the finished product.
I have created a BOM and also create a Purchase order for “A” items.
Then I create a stock entry of “A” as transfer raw material. (Here raw material costing is changed than earlier) In this, the raw material costing is not changing as per BOM as well as the valuation rate ( I tried and change the BOM and valuation rate as a new rate ). But still, the transfer rate in the stock entry is the older one. Here this costing is not changing as per BOM or as per the valuation rate of “A” Item.

Help me ASAP.