Something is off with Electric Terrain - While catching Xurkitree, it knows both Electric Terrain and Hypnosis.
However, Electric Terrain prevents grounded pokemon from falling asleep, no big deal, right?
There presents the issue. Decidueye is grounded, but despite Electric Terrain being up, when Xurkitree uses Hypnosis, Decidueye will still fall asleep. So I'm not sure what changed with Electric Terrain, but it seems not -all- grounded pokemon are immune to sleep while Electric Terrain is up anymore, either there's a hidden "Grounded" or "Not Grounded" stat now, or something else.