GMail emails that have been labelled return to Inbox after a few days

Description

I have several accounts connected to my Mailspring client, including both IMAP and GMail accounts. I tend to work by reading and replying to emails in the Inbox, and then filing them into folders to keep the Inbox clear (basically, I use the Inbox as a To Do list).

When I file an email from a GMail account into a folder (i.e. apply a label, in GMail-speak), it is properly saved into that folder/label. However, the email thread will often pop up again in my Inbox, anything from a day or so to many days later. Looking at the email, I see only the Inbox label has been applied to it (as shown at the top of the message viewer), and not the label that I had manually applied (and that it present when I view the email in its folder).

I will re-apply the label and the email is removed from my Inbox, but will often re-appear.

It’s not clear which emails will do this, but I believe it’s generally the most recent email and its ancestors.

Only GMail accounts show this problem - I don’t believe I’ve ever seen it with IMAP accounts. And I’ve never seen it with GMail accounts via either the web interface or other mail clients.

To Reproduce…

  1. Label an email in a GMail account.
  2. The mail is moved to the folder out of the Inbox.
  3. Wait several days…

Expected Behavior

The mail remains in the assigned folder permanently

Setup

Kubuntu 21.04, Mailspring 1.9.2 (deb).