First of all Sarai brought all this on herself when she told Abraham to sleep with Hagar. Sarai also blamed Abraham and Abraham put the blame on her. Read Genesis 16:1-6.
At Genesis 16:7 the angel of the Lord appears to Hagar and this is the first appearance of the angel of the Lord as the angel of the Lord. Also, I personally believe without a doubt that the angel of the Lord is the pre-incarnate Jesus Christ.
He at vv9 tells Hagar to return back to Sarai and submit to her authority. Vs10, "Moreover, the angel of the Lord said to her, "I will greatly multiply your descendants so that they shall be too many to count."
At verses 11-12 the angel of the Lord said to her further, "Behold, you are with child, And you shall bear a son; And you shall call his name Ishmael, Because the Lord has given heed to your affliction. Vs12, And he will be a wild donkey of a man etc. And he will live to the east of all his brothers."
Ishmael is recognized by Muslims as the ancestor of several northern prominent Arab tribes and the forefather of Adnan, the ancestor of Muhammad. At vs13 Hagar says, "Then she called the name of the Lord who spoke to her, "Thou art a God who sees; for she said, "Have I even remained alive here after seeing Him?"
Now, with regards to Deuteronomy 23:15-15 the following is what Barns commentary states. "Thou shalt not deliver unto his master the servant which is escaped from his master unto thee:
The case in question is that of a slave who fled from a pagan master to the holy land. It is of course assumed that the refugee was not flying from justice, but only from the tyranny of his lord."
I don't think Sari or Abraham are "pagan" masters. Secondly, the Lord God/the angel of the Lord took care of Hagar and blessed her. Finally, as a personal note I would like to throw out the following question?
It says at Genesis 17, "Now when Abram was ninety-nine years old, the Lord appeared to Abram and said to him, "I am God Almighty; Walk before Me, and be blameless, Vs21, And I will establish My covenant between Me and you, And I will greatly multiply you exceedingly."
Did the being who multiplied Hagar's descendants the same being who multiplied Abram's descendants at Genesis 17:1-2?