Regulation F was made available after the latest PKHeX release. You have three options:
Ignore the legality message, and add the ribbon knowing it's really OK to do that with the current legality rules.
Wait for the next PKHeX release (it's already been resolved internally, no build published yet).
Use the bleeding-edge development build / compile the program yourself, where it is recognized as legal. This build is only recommended for testing, as new features/changes might not work 100% for general users.