This has happened to me a few times.
I assume it has to do with a client or relay not picking up a NIP5 (I think it is) “common name” so to speak and defaulting to the full npub id.
For me it usually happens when I’m trying to tag someone and can only use their npub instead of their Nostr id