The government is to become the biggest shareholder in the US's only operational rare earths mine.