FIFO - Could I exclude a specific warehouse for COGS?

Hello experts,

I am Dynamics 365 user. We have two warehouse. One (A) is for picking and packing to customers, and the other (B) is keeping inventory temporarily (for goods in transit_purchasing).

FIFO is applied for costing. When I check the COGS, FIFO costing is calculated for all warehouses. The idea COGS should come from the warehouse (A)

Do you have any good idea on set-up in Dynamics 365 for a correct COGS?

The setting of Tracking dimension group is 'None"., and FIFO is based on the date (physical or financial) only.

Thank you.