It has nothing to do with your suggestion that he was checkmated by Cameron and a whole lot to do with Michael Gove stabbing him in the back.
Gove did Boris a favour, and Boris knows that deep down.
After leading the campaign to leave, he has essentially been compelled to enter the Conservative leadership contest to become PM. However, he knows all too well that this post is going to be a poisoned chalice in the next few years.
Note the ease with which he bowed out from the race. It's the perfect scapegoat. Withdraw from a contest for a position he doesn't actually want yet, and blame Gove for making him do it.
Boris wants to be Prime Minister one day. He just doesn't want it yet. The next PM will be leading the Brexit negotiations in an impossible situation where he or she will infuriate a lot of leave voters and remain voters alike, whilst dragging the UK through an economic downturn where the electorate, as always, will be looking for someone to blame.
For his personal aspirations, it's simply far better to pass the buck to someone else as they deal with this Brexit mess, and then run again one day when the UK is in a more "stable" position.
I also believe, like some others do, that Boris doesn't actually want the UK to leave the EU. After all, he did suggest that a Brexit vote could force the EU's hand to give a better deal so we could then stay.
I believe it was purely a method to put him in a better position to take over as Prime Minister. If we remained, he could put the blame on remainers for the UK's problems whilst claiming that he
would do things differently, but he can't because he "respects the will of the British people". With that, he would be protected from ever being called out on the truth of his stance.
However, just like Cameron, who only called this referendum to solve an internal party dispute, he never actually expected leave to win. He took what appeared to be a fairly low-risk gamble at the time and he lost.