This all happened already in Switzerland, as I never tire of saying on these threads. In 2014 Switzerland had a popular referendum (i.e. one demanded by the people, in Switzerland you can make a referendum happen by getting a petition of 50,000 signatures) to restrict free movement with the EU. Switzerland is not in the EU but a series of interconnected treaties give them free movement and single market access for some but not all goods and services. Anyway they/we voted to restrict free movement. The government went away and talked to the EU, sought legal opinions etc and came back and said we're not doing it, it would mean breaking this international treaty (and would be bad news for the economy).
Well, the people were up in arms, as you can imagine. What kind of anti-democratjc stance is that, to take the result of a referendum and check if it's practical before implementing it? International treaties be damned. Right, we'll have another vote, to change the law so that governments are forced to implement referendum decisions even if they break treaties. Take back control, etc.
The Swiss voted against. (I was a Swiss citizen by then, so I'm happy to say I helped with that one). As it turned out, although there were a few noisy hard-line "boot the foreigners out at any cost" types organising these referenda, the majority of Swiss felt either that free movement was fine, or that while it might have disadvantages (house prices are eyewateringly high compared to ten years ago) those weren't large enough to make them want to come out of the bilateral treaties with the EU and cause disruption and maybe job losses etc. And so it will be with Brexit, IMO. Whether we end up with a soft Brexit or another vote I think you'll find that a large chunk of last time's leavers will feel that while they might have wanted to leave the EU if that was going to be simple and straightforward ("easiest trade negotiations in history", "they need us more than we need them", "350 million for the NHS"), if it's as hard as it seems to be turning out to be (they've had three years, the parliament voted for Article 50, they wanted to be able to pass a deal, if this was in any way easy it would be done and dusted by now) then we would be better off staying after all.