Peering into the formation history of β Pictoris b with VLTI/GRAVITY long-baseline interferometry