Biodiversity is greater inside the world’s protected areas, scientists have been able to show for the first time.