User blog comment:LoneGrenadeWolf/How to Regain Loyalty/@comment-1857477-20110106045806

Miranda has plot armor; she can survive events in the finale that would kill other characters.

If you care about getting everyone out alive and have everyone else's loyalty, don't select Miranda for any of the specialist missions, don't take her along to kill the final boss, and keep Grunt, Garrus, and Zaeed holding the line (as they are the best defenders).