My fear though is that without an effective world government, AI companies/companies using AI to replace workers (and the shareholders of both) will exploit the many loopholes in the global tax system (and there will be a race-to-the-bottom among states to attract 'investment' from these companies/individuals) to avoid paying anything like the current tax revenues governments receive from salaried workers — making UBI policies impossible.
Ideally, a world government could be established (though if the United Nations is anything to go by this might not be a great solution...) but in the absence of this effective Digital Services taxes will become essential to continue to fund current public services (nevermind UBI).
It'll probably be like other revolutions: the torch and pitchfork vendors will make a lot of money, one or two peasants strike it rich, the rest go home empty handed.
The problem is that the elites will realize that they are better off if they cull excess humans. Any UBI or redistribution would come from their wallets and the wealthy would not want to give up any power they have.