Current behaviour for me with Thunderbird 115.11.0: An e-mail is in the inbox. -> I click on the junk button for that e-mail. -> The e-mail is automatically moved to the spam/junk folder and the junk icon is filled. If I click on the junk button for the e-mail again, then the e-mail is automatically moved back to the inbox and the junk icon is empty.