The EU shot itself in the foot.
It quickly realised that, and did a U-turn.
But you have a point, the EU President and Commissioners acted recklessly and without consulting its members. And brought the organisation into disrepute.
But they are stuck with them, only a change of constitution can change how the EU works and that is not going to happen.
Fortunately the UK has an elected leader and everyone put their cross next to Alexander Boris de Pfeffel Johnson in the Prime Ministerial Elections.