From an Fstoppers article:
For years the standard defense was an optical low-pass filter, also called an anti-aliasing filter, a thin layer over the sensor that blurs the incoming image by a hair, on the order of a single pixel, to smear out detail too fine to sample cleanly. It trades a little sharpness for protection against moire. As sensor resolution climbed, some manufacturers decided the trade was no longer worth it. Nikon sold two versions of the same body, the D800 with the filter and the D800E with its effect cancelled, and many high-resolution cameras since have dropped it entirely, betting that photosites packed tightly enough make moire rare and the extra bite of detail worth the risk. When it does show up, raw converters include color moire reduction to knock it back, though it cannot always be fixed cleanly.
Fujifilm took a different swing at the same problem. Its X-Trans sensors keep red, green, and blue filters but drop them into a larger, more irregular six-by-six pattern, about 55 percent green, that puts all three colors on every row and column and scatters the repeats. The added randomness is meant to break up the interference that produces moire, which lets Fujifilm leave the anti-aliasing filter off without the same artifact risk. The price is that the unusual layout needs its own demosaicing math, and for years some raw converters rendered X-Trans files softer or mushier than the sensor deserved.