The shorter `.onion` address is an older, less secure method of identifying the service, which uses a SHA1 hash of the 1024 bit RSA key associated with the serice.  The longer address is a newer format, which is the entire public ed25519 key associated with the service.  Some consumers of onion services don't support the newer format, which is probably why you got an error when you used it in `bitcoin.conf`.