Our constant in/out wasn't great for the EU as a whole and it's now very hard to argue that pissing off your largest trading partner (by nearly a factor of 4 over the next one which is the US) was a catastrophic mistake.
Still that's democracy, even when it doesn't go the way you wanted.
Was/is the EU perfect, nope - it has all kinds of problems that are going to need addressing but was the UK in totality better off in the EU, yep.