The UK voted to leave the efta, a free trade area and join a union that explicitly said it was aiming for ever closer political union. They knew it when they joined
The thing I’m not totally clear on is did the PEOPLE of those nations know that when they signed on or was it concealed from them? It is my understanding that the EU was not sold as a federal union. I’ve heard explicit denials that they want to be a superstate from EU officials.
One wonders if the people would have been so willing to join such a thing if they had known their nations were being absorbed into a federal union.