Yes, one reason trading around a core position is not usually beneficial in the US. The gains you keep the loses you lose until you sell and don't buy within 30 days. Learned the hard way years ago, up say actual 25% but taxes gains showed double that since wash sells discount loses.
One way to keep loses and same number of shares, is to buy first at the cheaper price then sell shares bought at higher price-- so buy then sell (instead of sell then buy). But you can't buy more within 30 days.