Ireland attracts those companies because its low taxes AND being in EU so EU "freedoms" apply.
Once UK is out of EU, it can lower its corporation tax - but for example storing EU citizen data in UK won't be that easy.... nor probably moving money around.
Unless UK obtains the "eat the cake and have it" deal - but I doubt that...