Saving draft and receiving emails are normal, but encrypted emails cannot be sent out via Hotmail (even though after turning off the digital signature, they can be sent). The configuration for the SMTP server is correct:

Server name: smtp.office365.com:587
User name: full email address
Connection security: STARTTLS
Authentication method: OAuth2

Initially, I thought the problem was caused by Microsoft authorization, since two weeks ago, a similar phenomenon occurred that neither normal nor encrypted emails could be sent. That problem was then solved by deleting saved password and cookies, deleting and recreating the email account in Thunderbird. This time, however, the cause is actually due to my updating the expiry date of the GPG keys once imported into Thunderbird.

About three weeks ago, after updating the expiry date using gpg, I manually uploaded the public key to a key server, since uploading directly via gpg command was not successful. Then in Thunderbird key manager, I refreshed the key and I could actually see the new expiry date. However, according to my current guess, this operation can only update the public key information not the private key stored in Thunderbird.

Hence, the final solution is to re-import public and private keys generated by gpg into Thunderbird, which override the existing ones. Then everything returns to normal again.