Step 1: Open Control Panel in your PC and navigate to Mail.
Step 2: Click on Email accounts button.
Step 3: Double-click on the respective account and click on More settings.
Step 4: Switch to Advance tab.
Step 5: Check the Purge items when switching folders while online checkbox.
Step 6: Click OK.