From Bulbapedia, the community-driven Pokémon encyclopedia.
Regarding the research template on the page (Ultra Burst on Necrozma)
After doing a quick test with a friend, I found out that Magic Room does not prevent Necrozma from undergoing Ultra Burst.
--McFlyMan (talk) 16:17, 5 July 2018 (UTC)