My understanding is that this is fairly well written in stone, There is no way to avoid the taxable event if you short against your gains.
If you need to protect a gain for a few months, an out of the money put can work. I believe the rule is that if you are past the first out of the money strike this is not deemed a constructive sale.
You can also do a straddle which costs less (or even nothing) in return for forgoing forward gains, but there is an even more obtuse law on this one and I completely forget it at the moment.
And one last play is to short a similar stock. Obviously this is generally not that useful in biotecchs, but could work well in stocks like airlines which trade as a group.