Admitted-until 10 June means stamped out by 23:59 on the 10th. Mid-morning on the 10th is fine. Wheels-up after midnight is not, even if you queued at 11pm. Immigration's stamp-out time is the clock, not the flight.
I'm David. I built Stretch to treat that stamp date as a hard exit so this is not a 1am surprise: https://doastretch.com/visa/