There is nothing wrong with this, it is system behaviour.
When the qty goes to 0, the cost goes to 0. You have done a stock write on at 0 value, or a GRPO at 0 so your current qty is 1 at 0 value.
There is no issue with revaluing this item to a new cost.