The Queen of England has many levels of security to keep her safe. The Queen's Guard exists mostly for tradition and the ceremonial role but she also has a sophisticated security team to protect her. There have been a few past incidents of intruders that have gained access to her living quarters, so no one is completely safe.
I believe the Queen's Guard is alert and ready for would-be attackers. The Guard is highly attentive and does not tolerate anyone in close proximity to the Guard or the Queen. They are quick to warn violators, and demonstrate a willingness to use deadly force, if needed. Showing they are willing to kill for touching them suggests they would likely take down someone trying to attack the Queen with no hesitation.
The Queen has bodyguards that follow her everywhere she goes. The Queen's Guard are professional and take their jobs extremely seriously. The Queen is as safe as person can be on Earth. Even though she has little actual power, England knows that the Queen is an important figurehead for the country.
No one is safe in this world. The Queen is as safe as she can be in her own rights and in her own security. What will be will be and no amount of security can keep her safer than she is meant to be. While I do not know the specific purpose of the Guards' shout, I believe that it has nothing much to do with the Queen's safety.