Now in your case there is technically no problem as the UAE company is also tax free. Hence you are shifting profits from the tax free island to the tax free UAE. But they is no exception for that. If your UAE company is connected to the island company, you cannot do it.
Maybe give us some more detail about the owners, UBO, shareholders, authorised persons of the companies. Any connections there?
If the invoices are between the ESR company and an unrelated client, there is no need to worry.
Just don't use the ESR company to sell services to your company. You can buy service from your company. Any don't use the ESR company to buy goods from you company. You can sell them goods.