I'm using a Yubikey 5.
If the OpenPGP app is disabled, then gpg-card shows a "Displayed s/n" of the form "yk-1234567". If the OpenPGP app is enabled, then gpg-card shows a "Displayed s/n" of the form "MMMM01234567" (where MMMM is the manufacturer id).
Even worse: If the OpenPGP app is disabled, then scdaemon returns the nice Yubikey-specific display serial number:
$ gpg-connect-agent 'SCD SWITCHAPP piv' 'SCD GETATTR $DISPSERIALNO' /bye S SERIALNO FF020001008A7796 piv OK S $DISPSERIALNO yk-9074582 OK
But, if the OpenPGP app is enabled, then the same command fails:
$ gpg-connect-agent 'SCD SWITCHAPP piv' 'SCD GETATTR $DISPSERIALNO' /bye S SERIALNO D2760001240102010006090745820000 piv openpgp OK ERR 100663384 Invalid name <SCD>
I think the problem is that app_select_openpgp() overwrites card->serialno which was set by app_new_register(). This may make sense for non-Yubikey cards/tokens, but it doesn't seem to be sensible for Yubikey tokens.