For completeness, I report the text of the comment below:
This is an old issue coming back from time to time.
The real problem here is that threading is done by the imap server through the THREAD REFS protocol command, and then organized for the infinite grid output to allow open/close of branches: the RFC does not take into account multiple folders, so the output is only for the current selected folder.
The only way to achieve the same result, is to have a copy of the sent mail in your inbox (by replying and sending to yourself always).