If it's just for company you don't have to live. If you have employees in UAE 🙂 My advice - don't listen just to UAE corporate advisors. Ask you home country lawyers if you will not get in trouble with your plans.
You have to structure everything in that they you won't have trouble in place you live.. if UAE is not the place you live.
Even if you live in UAE, you still have to check if you moved properly out of your country. Sometimes there are exit︀ tax'es and other limitations