Tree loss in one of the world's largest rainforests has slowed, a study suggests.