It would seem to me a distinct possibility that if the Tory membership elect a pro-Brexit ERG person as party leader, that the Queen might not call him/her to the Palace.
It is a fundamental axiom of our Constitution that the Monarch has to invite to form a government one who can command a majority. So what would happen if it was clear they couldn't?
I recollect that Theresa May said in her resignation statement that she was resigning as "party leader" on the 7th i.e. tomorrow, but that she would continue to remain PM until a new leader was in place.
So what happens if the new leader could not win a confidence vote?