Then is Acts 2:38 modalistic heresy? Acts 8:16? Acts 10:48? Acts 19:5?
Acts 10:48 makes no distinction: it does not say "in the Name of Jesus". The others are not exclusive; they say only that they were baptized in the name of Jesus, not that they were baptized ONLY in the name of Jesus. Jesus said to baptize in the name of the "Father, Son, and Holy Spirit".
Where does the idea come from, anyway, that "...in the name of..." is some kind of magic formula? It simply means you are acting in accordance with and in authority of an entity, not yourself alone.
Right: the authority of the Father, the Son, and the Holy Spirit.
A police officer acts in the name of the law, but that doesn't mean he has to say those precise words every time he holds up his palm to signal a car to stop.
But Jesus is speaking of an outward ritual or ceremony. He doesn't say "Let them be baptized": He says "Baptizing them in the name of".
When a messenger would come from Caesar, to another person, they would say "In the authority of Caesar!" or "In the Name of Caesar!". It was an announcement, letting those know from whom their authority comes. Same thing here.
But besides this, is Jesus Christ not the fullness of deity [Colossians 2:9]? If so, how does that deny trinity, assuming that is what is meant by "modalistic heresy?"
But the emphasis is whatever Jesus WANTS the emphasis to be. His emphasis in Baptism, is not the oneness of God, but instead, three persons of the Trinity. Jesus did not say "In the name of the one God". He said "In the name of the Father, Son, and Holy Spirit": the three persons of the Trinity. Jesus emphasized the Three-ness of personhood in His Baptistic formula...
And so should we.