As you may know EU has been around a long time. So, yes, many of the companies would not have been investing in the UK before EU existed. They may not leave instantly, of course, but in due time investements will be channelled elswhere.
Wealth is found where employement is found, so it would not be better for the UK if employers moved out of the UK. That is just some bizarre reasoning.