St. George’s Chapel is a Royal Peculiar, which means it falls directly under the Queen’s authority rather than to her government or her church authorities so she probably technically could have not worn a mask, but she would never do that. She also likely would have been sitting alone in normal times because Phillip sat next to her. There are rigid protocols and traditions that carry them through times like these.
Besides, the protocols are put out by her government so they are in her name. She isn’t going to contravene them. Her sole function, for which she was anointed and crowned, and to which she vowed before God to do until her dying day is to be the figure of unity for the nation and the embodiment of its values and identity. It sounds strange to us, but that’s what a monarch is. In public, there is no Elizabeth Mountbatten Windsor, only Elizabeth the Queen.
As a person, Elizabeth lived through the bombing of London. Her parents went out to inspect the damage frequently and her home was bombed. She’s had her beloved uncle blown to bits by terrorists. She has been assaulted by an armed man while trooping the Colours. She has woken up to find a slightly “out of it“ man sitting on her room. She has been vilified and praised. A mask isn't going to bother her in the slightest.