Maybe the dress is supposed to be a beach/pool coverup?
Anyhow, I can explain the difference in uV absorption amongst different fabrics and take a stab at why uV coatings might last longer than the bug repellant coatings.
This article from REI does a nice job of explaining the physical differences amongst fabrics, e.g. more highly-woven and less stretched out, is going to provide more protection because the uV rays are physically blocked to a greater extent, just as you get more protection from the sun under a regular roof than a lattice roof. Also, more reflective is better and the uV rays bounce off more.
The article also alludes to the chemical differences between cotton and polyester.
This football jersey graphic from Compound Interest (one of my favorite sites) shows the difference between cotton and polyester. If you look at the polyester, it contains hexagons with double and single lines (AKA benzene rings) as well double lines to O’s (AKA a carbon-oxygen double bonds, or carbonyls). Compounds with these features absorb uV light, providing a chemical as well as a physical barrier. If you look at the cotton, it contains neither of these uV-absorbing features.
As far a bug- vs uV-resistant chemicals, my guess would be that the bug ones work by converting to the gas phase to some extent so that there is a “cloud” of it above the surface of the fabric. Over time, the bug chemicals are thus going to evaporate, a process that may be hastened each time the garment is washed. The uV additives, on the other hand, work by absorbing uV radiation in the same way as the benzenes and carbonyls do in the polyester. Thus they don’t need to be volatile. But all this is just a hypothesis.