This is Aquinas's Summa Theologiae Part I, Question 25, Article 6, as translated, very roughly, by me. The Dominican Fathers translation is here; the original Latin is here.
It seems that God is not able to make better than He makes.
(1) For whatever God makes, he makes most powerfully and wisely. But something is made better to the extent that it is made powerfully and wisely. Therefore God is not able to make better than he makes.
(2) Further, Augustine (Contra Maximin.) argues thus: "If God could, but would not, beget a Son His equal, he would have been envious." By the same reason, if God could have made better things than He made, and would not have, He would have been envious. But envy is in every way removed from God. Therefore God makes of everything the best. ThereforeGod is not able to make something better than He makes.
(3) Further, that which is in the best and most intensive way good, is not able to be made better, because nothing is better than best. But, as Augustine says (Enchiridion), each single thing that God has made is good, but all together as a whole (universa) very good, because in all consists the amazing beauty of the whole (universitatis admirabilis pulchritudo). Therefore the good of the whole (bonum universi) is not able to be made better by God.
(4) Further, the man Christ is full of grace and truth, and has the Spirit beyond measure, and so is not able to be better. Created beatitude also is said to be the highest good (summum bonum), and so is not able to be better. Also, the Blessed Virgin Mary is exalted above all choirs of angels, and so is not able to be better. Therefore not everything that God makes is able to be made better.
But contrariwise is what is said in Ephesians 3, that God is able to do all things more abundantly than we wish or understand.
I reply that it must be said that the goodness of any thing is twofold. (1) That which belongs to the essence of the thing, as being rational belongs to the essence of the human being. And with respect to this good, God cannot make something better than it itself is, although He is able to make something other than it that is better, just as He cannot make the number four greater than it is, because, if it is greater, it is not four but some other number.For addition of a substantial difference in definitions is just like the addition of one in number, as is said in Metaphysics VIII. (2) Another goodness is what is in addition to the essence of the thing, so the good of man is being rational and wise. And according to this good, God is able to make better the things made by Him. But simply speaking, God is able to make something better than any thing made by Him.
Therefore to the first it must be said that, (1a) when God is said to be able to make something better than He made, if the 'better' is taken as a noun, it is true, for He is able to make some other thing better than any particular thing. (1b) Likewise, He can make it better in one way and not in another, as was said. (2a) But if the 'better' is taken as an adverb, and indicates the manner of the making, then God is not able to make better than He makes, because He is not able to make it from greater wisdom and goodness. (2b) But if it indicates the manner of the thing that is done, then He is able to make it better, because He is able to give a thing made by Him a better accidental mode of being, although not a better essential one.
To the second it must be said that it is of the nature of a son to be equal to the father, when he comes to be complete, but it is not of the nature of something created that it be better than God has made it. Therefore the analogy fails.
To the third it must be said that the whole being supposed, it is not able to be better; due to the most appropriate order given to things by God, in which the good of the whole consists. For if some one thing were better, the orderly proportion would be corrupted, just as, if one string were drawn more than it ought, the melody of the harp would be corrupted. But God is able to make other things, or to add other things to the things that are made, and then there would be a better whole.
To the fourth it must be said that the humanity of Christ, from the fact that it is united to God, and created beatitude, from the fact that it is enjoyment of God, and the Blessed Virgin, from the fact that she is Mother of God, have a sort of infinite dignity from the infinite good that is God. And given this there cannot be something better than these, in the sense that there cannot be something better than God.