Queen's Regulations
Instructions from the boss.....so pay attention.
"The personal salute, in addition to being a mark of respect, is an act of courtesy and good manners. It is never wrong to salute even if subsequently the person saluting another discovers that person is not entitled to be saluted."
Furthermore:
"An Officer of Her Majesty's diplomatic or other non-military service is entitled to the honours appertaining to his office"
So, regardless of one's views, the PM is entitled to a salute, even in common courtesy