It just makes the poor people move elsewhere, they are still around.
Also a lot of non-market housing being rented, all those people also benefit.
Poor areas have few people with the knowledge/ resources to really leverage gentrification which is why they are living in poorer neighborhoods to begin with. So the average outcome may be a slight improvement due to the major winners, but the median outcome is likely a net loss.