I don't know. I just finished Moon, and I've yet to try the postgame content. For now, X/Y is above Sun/Moon, but only because it tells its story better, in my opinion, and does not feel cramped by the 3DS's capabilities. I hope Pokemon Stars on the Switch makes Sun/Moon justice and creates a postgame akin to HG-SS/Emerald. Exploring Kanto again and the Battle Frontier. Now THOSE are postgames.
You know it deserves the GOTY.