This was fixed upstream in https://dev.mutt.org/hg/mutt/rev/428a92464d5b
Note that fix requires $smime_sign_digest_alg to have a "-md %d" added to it, so the header matches the actual digest used. The digest algorithm can be set with $smime_sign_digest_alg. See contrib/smime.rc.