With the many advances in technology that have happened over the years, lenses have become better and better at reducing flare from sun and light overall. This has to do with how glass has become better and how the chemistry involved in the coatings has improved.
Many, many years ago back in the film days, photographers needed to use UV filters with their lenses. One of the biggest reasons for this had to do with glare from the sun and extraneous light that caused flaring that didn’t look so great. Indeed though, lens flare can sometimes look great but it is very situational.