A key point is that standard ETFs rarely have a need to rebalance. They typically track indexes with reasonably fixed share-based weightings (capitalization-weighted or price-weighted). Yes, the index composition changes a little as stocks are added and dropped over time, but this is usually a minor amount of the portfolio. And when the adjustment is due to a merger, acquisition, or spinoff, that is typically a tax-free swap as it would be for an individual holding the stocks directly.
The in-kind exchange via authorized participants (APs) that Bob Baerker mentions is about allowing the ETF to shrink its holdings when people sell, without selling its holdings (and incurring the associated gain that would have to be distributed to remaining ETF holders). As the ETF market price sags, an AP will redeem ETF shares and receive the portfolio basket; those stocks leave the ETF and any taxable gain on them disappears. But I think the basket has to reflect the current composition of the ETF, and an AP can't be given just the stocks the ETF wants to get rid of tax-free.
As far as I know, when rebalancing (changing the composition of the ETF) does occur, realized gains are taxable. Such rebalancing would be more common in ETFs that do not have a simple 100% long portfolio.