Finally, an answer to my question. Thanks Colwyn.
Someone suggested the Government could just ignore the referendum result and just stay in. Also, a new Government could claim to not recognise the referendum and again just stay in.
I wonder if either/both are possible?