Also noticed a modal messagebox popping up regularly when having kmail running. Below is a workaround that simply always answers the question with no instead of asking.
--- gnupg2-2.2.43.orig/agent/trustlist.c +++ gnupg2-2.2.43/agent/trustlist.c @@ -687,6 +687,9 @@ agent_marktrusted (ctrl_t ctrl, const ch if (!nameformatted) return gpg_error_from_syserror (); + // We do not trust this. Do not show that dialog. + return gpg_error (GPG_ERR_NOT_TRUSTED); + /* First a general question whether this is trusted. */ desc = xtryasprintf ( /* TRANSLATORS: This prompt is shown by the Pinentry