Paints have varying degrees of UV resistance (durability). There are several factors that influence resistance to UV durability including: resin (or binder), pigmentation, and additives. Some resins or binders are more resistant to UV degradation than others. Polyurethanes, acrylics, and polyesters are better than alkyds and epoxies. Inorganic pigments are better than organic pigments. In addition, there can be significant differences in UV durability between different types of yellow, red, and orange organic pigments. There are also additives such as UV absorbers and HALS (hindered amine light stabilizers) that can be added to paints to improve UV durability.
Formulating paint is more complicated than I imagined, and I'm still learning things even after 35 years of formulating paint (industrial coatings).