You lose earnings. You don’t lose the stake. But when you are forced to sell early, you do lose the stake.
Should you look at the opportunity costs for lost potential gains in this scenario -- yeah. Does it "lose money" -- no, not unless you are forced to sell before maturity.
lost earnings are a wish for what could have been, not lost in reality.