I've seen a couple videos on the Internet about legendaries and Ultra Beasts being coded to be not a shiny unless if someone is using ROM hacks like for example, Solgaleo and Lunala not being a shiny in the games due to code unless hacked. Since Xurkitree is my favorite Ultra Beast, has Xurkitree been coded not to be a shiny with hacking in Pokémon Sun and Moon? I just wanted to ask this so I wouldn't have to waste 30,000 soft resets on trying to find shiny Xurkitree. Thanks!
Yes, Xurkitree is shiny locked, which means you cannot get it's shiny form.
Yes, along with the other legendaries, UBs and Tapus.
A full list of shiny-locked Pokémon can be found here.