Since we don't have access to the actual raw data, all I can do here is make a best guess from experience. But first let me suggests that an inventory recalculation will probably adjust the cost value of the Sold transactions and you will end up with on-hand at $2.00 as expected afterward.
The way AX assigns cost value to issues (negative quantities) from stock works like this. If there's a positive on-hand quantity and on-hand value, then the value is divided by the quantity to arrive at what is commonly called the "running" average cost. It will do this even when you think you are assigning it a cost value, i.e. using an inventory movement journal to write-off stock and specifying the unit cost in that journal which will be ignored.
If the on-hand quantity is zero or negative, or the on-hand value is negative (or maybe zero?), then AX uses the price on the Manage costs fast tab of the Released product to calculate the cost value. But, a number of things impact how it determines quantity and value. The most obvious is your inventory dimension setup or what constitutes a financial cost boundary. Somewhat less obvious are settings on the model group, such as whether to include physical cost, which is AX-speak for whether receipts that are not yet financially settled (a.k.a. invoiced) should be included in quantity and value calculations.
So my best guess given what you've provided is that those Sold issues at $0 drew from the price on the Manage costs on the Released product, which means the on-hand quantity or on-hand value calculated by the system according to all of the setup and configuration available to it must have been zero or negative at the time. Obviously with backdating and out of sequence transactions it can be somewhat difficult after the fact to reconstruct this fact, but I think it's almost certainly what happened in your case. And the most confusing case of this is when inventory is financially negative but physically positive, because, well, that just confuses people who are new to AX.
Then a subsequent receipt brought the on-hand quantity back above zero, and contributed its full value to the on-hand value, but with some issues at $0 the average of the now excessive value over the correct quantity leaves the "running" average cost, which is visible to you on the inventory on-hand forms, too high. This is perfectly fine and by design. In fact anyone who deals with AX long enough will eventually see a positive on-hand value while at 0 on-hand quantity, unless standard cost is in place. It's easy to construct simple examples to illustrate this.
However, the inventory recalculation process is designed to smooth all of this out, by assigning issues to receipts discreetly, and adjusting the cost value of issues in proportion to the settled receipts. If you ran that today, I'm certain that the value of the $0 issues would be increased to $2.00 unit cost, and the value of the remaining on-hand inventory would then be reduced to $2.00 unit cost, as you have already calculated it would be had those $0 issues been at $2.00. And, the adjustment of the cost value of those issues to a production order will automatically increase the value of the production receipt (finished good), which will automatically adjust the cost value of the issue to the sales order that sold it (cost of goods). And so on.