I posted the following on a previous discussion regarding junk mail issues, it might help - basically I've found that sometimes Mail doesn't remember how you have marked junk email when it quits!
If you have followed all the standard advice ( Mail for Mac: If junk mail filters aren’t working correctly ) that includes resetting the junk filter so it starts learning again then try and watch what happens when you close the mail app.
I've noticed that sometimes the app closes immediately and on others there is a slight pause - I have mail set up to auto remove deleted items when closed, but it doesn't do it if it closes immediately, they only seem to get removed when I observe the pause!
Not sure what's happening but I've now started to reconfirmed junk items if I see mail close immediately by reopening and selecting not junk/junk again and then reclose, which does appear to be improving the success of my junk filter for the moment anyhow.