It seems to me that too many deaths is detrimental to mastery scores.
But also keep in mind, you are graded against other players who play the same champion in the same role/location, so picking a popular champion in a popular place (annie/ mid) is going to grade you against a larger pool of other annie/mid games, rather than if you went somewhere less common, like annie/top (or perhaps annie/support).
When you game is complete, the system takes your relevant stats (like kills/deaths/assists, damage delt, wards, some other stuff - they never told us what it looks at specifically) and generates some score. Then it compares the score to the continuum of scores for that champion in that role/location, and assigns letter grades based on what percentile you fall into.
If you play in a combination that has a smaller pool, there is a higher chance you fall into a better percentile (statistics gets weird when dealing with small samples and the system is designed for pretty large samples)