I think you’re right in many ways. No arguing that most mainstream economists were in favour of Britain staying in the EU. In fact, many speculators and investors were assuming that Britain would stay because it was almost inconceivable that they could leave.
However, I think there has been a lot of economists coming out in favour of leaving. More than we would think, despite the fact that it is a really unpopular view. Most of these opinions come from well respected economists inside of Britain. This is probably because Brexit fucks over a lot of other markets as it leaves. I have found about 5 or 6 of these people. Id say the most convincing is Steven Keen, among others.
Check him out here on Macro Voices, talking about why it makes sense to leave.
For the record, I personally think Brext is messed up, short sighted and narrow. And yes, I think the majority of people voting to leave were doing it for anti immigration and xenophobic reasons. That doesn't mean it didn’t make economic sense though in other ways. How does the rich and powerful get the populace to do as they want? Pander to fear, phobia and hatred.