Whether keeping up with the mainstream is a plus or minus when the mainstream's values and worth is so questionable, is debatable. For example, Madonna did always try to keep up with the mainstream, the latest trends, always employing the hippest producers of the moment, but I would not say that made her music good. Hip of the moment? Perhaps. But much of her new stuff is unlistenable, at least to me. And it's not like it helped her keep selling either. Her latest albums were flops. And give me save the planet anthems any time over a 55-year-old woman acting like she's 16 and singing silly lyrics like that, just because she's trying to "keep up" with the likes of Miley Cyrus or Niki Minaj. Sometimes it's good to keep up with latest trends, but sometimes it's a compromise an older artist who has artistic integrity should not take IMO.
It's natural that after the age of 40-50 most artists come to a decline and they will not sell as much any more. It has nothing to do with "keeping up", it has all to do with the fact that this is an ageist industry and no matter what they do they just will not sell like young artists who mainly appeal to the record buying public.
You have older artists who do not try to keep up, just do the same old music they always did (eg. Bruce Springsteen) and they do not sell a crazy amount. (Springsteen's latest album sold less than Xscape.) They have their core, older fan base and that's it.
Then you have older artists who do try to keep up (eg. Madonna, Mariah Carey) but they flop even harder than the artists who just keep doing their old stuff. That's because at least these latters keep their artistic credibility and integrity while the ones "trying to keep up" lose their old fan base because someone who liked for example Mariah Carey in the 90s won't like her current music - it's just not appealing to the demographic who used to like Mariah. And young people who she tries to appeal to now, are just not interested in these "old grannies".