Net migration to the UK hit a higher than previously thought record of 906,000 in the year to June 2023.