Do not generate Legacy packet format by default
According to RFC9580 "The Legacy packet format SHOULD NOT be used to generate new data".
GnuPG however still generates legacy packet format for all PKESK packets.
Here is the code building PKESK packet: https://github.com/gpg/gnupg/blob/c0f9ca47f064a3a401d965f3821e203eef2228c9/g10/encrypt.c#L1318-L1321
Then inside build_packet the variable new_ctb is never set for PKT_PUBLIC_KEY:
https://github.com/gpg/gnupg/blob/c0f9ca47f064a3a401d965f3821e203eef2228c9/g10/build-packet.c#L131-L170
Fixing it may be a matter of unconditionally setting new_ctb when --openpgp compliance is enabled unless it breaks something later in the code.
This has caused problems for chatmail because we expect only non-legacy packets: https://github.com/chatmail/filtermail/issues/43 As a result, all messages sent using GnuPG and FreePG are rejected as the first packet is normally a PKESK.