A bankruptcy court has allowed the Avalanche Foundation to buy back 1.97 million AVAX tokens it sold to the defunct Luna Foundation Guard.