Stop Thunderbird from applying filters after moving message to IMAP subfolder

To sort incoming messages from an IMAP mailbox into subfolders, I set up a set of filters:

  1. If To or CC contains me@mydom:
    1. Stop filter processing.
  2. If To or CC contains box1@mydom:
    1. Move the message into box1 subfolder.
    2. Stop filter processing.
  3. If To or CC contains box2@mydom:
    1. Move the message into box2 subfolder.
    2. Stop filter processing.
  4. If To or CC contains box3@mydom:
    1. Move the message into box3 subfolder.
    2. Stop filter processing.
  5. If To or CC contains box4@mydom:
    1. Move the message into box4 subfolder.
    2. Stop filter processing.

Now, if a message arrives with To or CC containing several triggers at once, like box1@mydom, box2@mydom, box3@mydom, then Thunderbird (115.18.0):

  1. Moves the message into box1 subfolder.
  2. Moves the message into box2 subfolder.
  3. Moves the message into box1 subfolder.
  4. Moves the message into box2 subfolder.
  5. Moves the message into box1 subfolder.
  6. Moves the message into box2 subfolder.
  7. … and so on, infinitely.

I found topics where people complained about Thunderbird not applying filters to subfolders, and those need to be run manually. But I witness quite the opposite behavior: not only are filters applied to subfolders automatically upon receiving new mail, but continue to be applied even after Stop filter processing action — just as if the message is seen as completely new (despite having the same Message-ID, as noted in the Filter log).

Is there an option that I miss?