I think you just need to check the checkbox for tools -> account settings -> junk settings -> "trust junk mail headers set by". However, not every implementation of SpamAssassin sets the same headers or modifies the subject the same way. For example,
www.fastmail.fm added a {SPAM #####} prefix to a messages subject
{SPAM #####} SPECIAL PHARMACY DISCOUNT, you pay & we ship, no question asked, established by reputable Canadian Doctor
and added the following headers:
X-Spam: high
X-Spam-score: 25.2
X-Spam-hits: BAYES_99 3.5, HTML_50_60 0.134, HTML_MESSAGE 0.001, MIME_HTML_ONLY 0.001,
RAZOR2_CF_RANGE_51_100 0.5, RAZOR2_CF_RANGE_E4_51_100 1.5,
RAZOR2_CHECK 0.5, RCVD_IN_BL_SPAMCOP_NET 2.5, URIBL_BLACK 3,
URIBL_JP_SURBL 4.087, URIBL_OB_SURBL 3.008, URIBL_SC_SURBL 4.498,
WPBL_RBL 2
X-Spam-source: IP='87.245.133.8', Country='RU', FromHeader='net', MailFrom='net'
I don't know what Thunderbirds junk mail control is looking for. On the other hand I think there is no way to change what SpamPal modifies, so that probably avoids the issue.
I don't use the junk mail controls. However, I could use a message filter that tests whether X-Spam: contains high and set the junk status if it does. That would eventually train the junk mail controls. Its harder if you just have a numeric score to test.
I suggest you file a bug report at
https://bugzilla.mozilla.org/ . They need to document what headers and what prefix in the subject Thunderbird looks for when it trusts SpamAssassin. If you do that please post the URL for the bug report.