Is the UAE tourist visa still valid after changing the passport number?

I recently applied for a tourist visa / visit to the United Arab Emirates. The passport with which I made the application, whose number appears on the electronic visa I received, is damaged, so I could not even fly there.

If I get a new passport, will it be a problem with immigration?

Will they allow entry, since I now have a new passport with a different number than the visa?