It's definitely enforced in Gen 8+, at least in formats that have Obtainable Formes as a rule. If you don't see it change in a Gen 5-7 format, that's because you can have a Secret Sword Keldeo in the normal forme if it was taught Secret Sword in BW1, then transferred to any game up to USUM.