I guess it depends upon the church.

Ours (an outreach church, e.g. street ministry etc) has a real liberal dress code, and we get a real mix, from dressed up to the nines to ultra casual (cargo shorts, tee-shirts, ball caps & flip-flops), to everything in between.

As such, some folks take off their headwear, and others leave them on.
If wearing a bonnet I have been known to leave it on (except during prayer), and if I'm "cowboy'ed" up then the 10 1/2 gallon (I never do anything small ) comes off & stays off through out.