The only way to get Anderson to survive is to have a full paragon bar, which means you pretty much can't choose any renegade dialogue tags or action trigers
On another note this is a fantatsic,
VERY well written article written about the 5 major flaws with the ending.
https://www.gamefront.com/mass-effect-3-ending-hatred-5-reasons-the-fans-are-right/
It made me realize things about the ending that I didn't know, like:
When the mass relays are destroyed it shows the galaxy map of all the mass relays exploding, but in reality that is showing whole solar systems exploding. I guess in the Arrival DLC for ME2 it is said that if a mass relay is destroyed it creates a super nova.
I highly recommend it.
Oh, and Corey Hudson (Bioware producer of the series) has this to say about the end:
"I didn't want the game to be forgettable, and even right down to the sort of polarizing reaction that the ends have had with people–debating what the endings mean and what's going to happen next, and what situation are the characters left in.
"That to me is part of what's exciting about this story. There has always been a little bit of mystery there and a little bit of interpretation, and it's a story that people can talk about after the fact."
https://xbox360.ign.com/articles/122/1220712p1.html
Well, congratulations Mr. Hudson you made a pretty unforgettable game with an unforgettable ending... sadly, it is for all the wrong reasons.