P1787: CWG2370 is resolved by performing a search in (only) the immediate scope of any friend, per the CWG opinion from San Diego.
Wording: In a friend declaration declarator whose declarator-id is a qualified-id whose lookup context is a class or namespace S, lookup for an unqualified name that appears after the declarator-id performs a search in the scope associated with S. If that lookup finds nothing, it undergoes unqualified name lookup. ([basic.lookup.unqual]/6).
Clarification for P1787 description: when applied to the test in this patch, "immediate scope" refers to N, and "(only)" refers to the fact that type is not searched in parent scope of N. See example after the wording if additional clarification is needed. The most relevant line there is friend void A::f(F); // OK.
The implementation seems to all accept this example: https://godbolt.org/z/vE6bEP6xa
but the examples from the p1787 have a decidely mixed conformance: https://godbolt.org/z/dhq7oEKaY
but the A::F(F) you point out in your example clang does get wrong and gcc does not. So at minimum please file bug reports against the examples that clang does not get right from p1787 and we need to dig into why your example above seems to not the same since that is what you intended.