GPG asymmetric decryption should fail, but does not

It’s not much used, and unless automated test exists (I don’t know), that’s possible, but past test had

It’s context-dependent. Please describe how you are running. From a shell? If so, quoting is incorrect.
If you are doing it from the GUI and using the three-dot-menu Edit as text, it wouldn’t have dashes and also wouldn’t need any special quotes to protect from the shell because there isn’t a shell around.

Since you run gpg and I don’t, do you know if gpg itself requires any double quoting on --recipient? There are example on the Internet without it, so I’m not sure why the solution there decided to quote…

EDIT 1:

In GitHub issue, it sounds like it was from someone else, and I see a report it worked, and one it didn’t.
Asymmetric is not the usual way gpg is meant to run here, and seemingly the developer hadn’t used it.

EDIT 2:

Let me mention the GitHub post directly. Perhaps that will bring advice from somebody who’s tried this.

There’s quite a bit there, including the point that Duplicati’s backup normally needs to read data back, which makes me wonder if you turned that off. It reminds me of the problem that cold storage gets in.

Verifying backend files and Compacting files at the backend may have to get sacrificed, and is a loss.

EDIT 3:

Is this all from the command line? The GitHub issue people were using the GUI, which possibly didn’t remove the leading double dashes at the time, but does now. So you might have made a quotes error.

EDIT 4:

so if you just toss this into a shell,
--gpg-encryption-switches=–recipient "xyz@xxxjkhadslkh.com", possibly Duplicati treats as
--gpg-encryption-switches=–recipient
which will break decryption, right?

EDIT 5:

Having embedded spaces in a string that should be kept together is a risk in any command line usage.
Are you determined to use the command line? The GUI doesn’t have a shell, so option entry is simpler.

EDIT 6:

A counter-argument is The gnupg-key was created and trusted for xyz@xxxjkhadslkh.com.
When I test something on the command line like the input you show, it splits wrong, and tells me that:

System.IO.IOException: Backup aborted since the source path “xyz@xxxjkhadslkh.com” does not exist. Please verify that the source path exists, or remove the source path from the backup configuration, or set the allow-missing-source option.

so there must be something different in the invocation. Mine was similar to yours, but on one line and adding --encryption-module=gpg. Maybe you should try manually decrypting files to see if it works.

If you can get it by hand, and also get the right arguments into Duplicati, it seems like it ought to work.

If you want to see the invocation of /usr/bin/gpg by Duplicati argument by argument, you can try script

#!/usr/bin/bash
echo Command and arguments
for word in "$@"; do echo "$word"; done
prog="/usr/bin/gpg"
echo Running "$prog" "$@"
exec "$prog" "$@"

or something similar. Make it executable, have --gpg-program-path point to it, and watch the output.