Sometimes the rules work and sometimes they don’t. And junk mail in the trash isn’t really a bad thing.
Mail already knows that if it is junk, it goes in the junk folder. The trick is to train Mail to know what is junk. Get rid of the rule. Go to Mail’s preferences and click on the Junk icon. Here’s where you can tell Mail what to do. Give this a try and see how it behaves.