It is uncommon for girls to be topless after the swim nappy stage. A combination of safeguarding awareness (teaching children about private body parts) and covering up more for UV protection when outside have contributed to that shift in culture.
There's also been parallel shifts in culture with moving to proper PE kits rather than pants and vest (where vest may not have been worn in warmer weather) I doubt many parents of 4-7 year olds would welcome a return to that standard of dress...
My sons have usually had their tops covered when swimming, first with UV suits that went over their swim nappies that made them easier to hold than slippery wet skin. They also reduced the number of sensory changes of being in/ out the water with a more consistent feel. They then wore shortie wet suits for warmth. Larger costumes also make it easier to be more visible in the water for safety/ lifeguarding with sensible colours compared to bare skin. There are many practical reasons why children are wearing more for swimming that aren't about modesty.
A 4 year old girl probably wouldn't raise eyebrows being topless in a more "male" style of trunks/ shorts that are cut a bit more generously. Bikini bottoms are socially coded as being half an outfit in a way that boys' swimwear isn't. It's clashing two layers of social expectation and stands out as unusual.
4 is not so very far from ages where physical differences start to show up. 4 is the start of school years and by 7 at the end of infants there is a need to draw a line on female and male privacy. Embarassment sometimes does kick in naturally, it doesn't always and I wouldn't want to have to teach two layers of social rule of acceptable dressing/ privacy a few years apart. I was a late developer and only started wearing crop-tops and bras out of social pressure at secondary school, first on PE changing days as no one else was topless. I only finally wore a bra daily because I was laughed at and ridiculed by the boy behind me who couldn't see straps through my shirt. Drawing a line at physical differences doesn't always hold up well and creates years of gulf between early developers and late developers.
For comfort, we're in an era of a range of options on what swimwear is avaliable.
A topless 4 year old girl wouldn't offend me, but it is something that is sufficiently unusual (in a swimming pool) to attract attention and comment. In gender expectations, it's not a hill I would die on to buy a couple more years on in gender neutral/ equal dressing.