assets.publishing.service.gov.uk/government/upl…
"...If the Prime Minister resigns on behalf of the Government, the Sovereign will invite the person who appears most likely to be able to command the confidence of the House to serve as Prime Minister and to form a government."
In July, May was able to both advise HM to call Johnson, but also Johnson had working majority.
'if there is doubt it is the responsibility of those involved in the political process, and in particular the parties represented in Parliament, to seek to determine and communicate clearly to the Sovereign who is best placed..'
'As the Crown’s principal adviser this
responsibility falls especially on the
incumbent Prime Minister, who... may also be asked by the Sovereign for a recommendation'
But it also talks about more recent expectation that a PM not resign until a successor is clear
So all clear?