I'm sure you can offset unrealised capital losses against your income ... like you can do with depreciation
There's a timing issue though. Taxes are assessed on previous year but your stock value is market price. If imagine it's April 2025... your stocks appreciated crazy high in 2024 so u owe a huge amount of unrealized gains tax. But right now it's April 2025 and stocks tanked in February. You now have to sell at a loss to pay your unrealized gains taxes.