The official legality checks do not care about RNG restrictions, but fan tools can catch things you modify.
As is always the case, the answer always depends; does the encounter have an RNG correlation that generates immutable values, and is this correlation reversible back to the original seed? If the answer is yes, then the correlation can be checked & validated to see if the immutable values have been tampered with.
Gen8 raids have this correlation for multiple values. Due to a higher-than-normal amount of CPU calculation required and not wanting to lag the GUI as you flip through boxes, PKHeX does not implement this as a live check -- you must manually check it with other tools/plugins.
Gen8 overworld encounters have this correlation for multiple values. Since the seed is constrained to only 32 bits, the calculation is instant, thus done by PKHeX. (raids use a 64 bit seed, thus a 2^32 search space needed).
Gen5 mystery gifts that are shiny have a simple correlation for PID.
Unmentioned: again, depends on the encounter.