In What Scenarios Is Impermanent Loss Actually Realized as a Permanent Loss?
Impermanent loss becomes a permanent, realized loss the moment the liquidity provider withdraws their tokens from the pool. If the price ratio of the deposited tokens has changed and the LP withdraws, the value difference compared to the initial deposit (HODL value) is locked in.
The loss is also permanent if one of the tokens in the pair suffers a catastrophic failure, such as a hack or a stablecoin de-pegging to zero. As long as the assets remain in the pool, the loss is only "impermanent" because the price ratio could theoretically return to the original deposit ratio.