Did I say mandatory? I meant optional! You’re “free” to die in a cardboard box under a freeway as a market capitalist scarecrow warning to the other ants so they keep showing up to make us more!
I still don’t understand why you are bringing up the rare case of a company going bankrupt and shorting the stock?
MSFT was $28 in 1998, $58 in 2000 and back to $28 in 2001. You’d have paid capital gains tax for 3 years despite making $0 capital gains and taking $0 losses. There’s no bankruptcy.