While the price is inside your range, your position earns a share of the fees on every swap.
When the price leaves it, the position earns nothing and holds only one of the two tokens.
It earns again only if the price comes back — or you move the range, which is a new position.
Fees are paid only to the liquidity active at the price where a swap happens, so a position out of range shares in none of them.
Leaving the range is not a loss by itself: it is the pool having converted the position fully into one token along the way.
Each pool page here counts how many of the last days the price stayed inside the suggested range.