I apologise for not expressing myself better.

Of course hats are worn on the parade part but they are removed at the start of any service and replaced when the service ends.

I am not sure what is usual for females in the armed services though but I expect it would follow conventions as in a church.

I must take a closer look at the next televised one to check that out! Such services are not compulsory to attend but those who go will then observe the conventions.