Jude 1:9 is a Gnostic insertion.
No, it happened just like Jude says.
Michael was sent to bury Moses so his grave would not become an idolatrous shrine. Satan wanted Israel to be forever idolatrous with Moses.
In answer to Michael's prayer, God took care of it. No one knows where he briefly was buried, but now he is in heaven with Elijah.
It happened, and the Jews knew it. The story ends up in the Bible independent, no connection at all with pseudepigraphical books or Gnostics.
Jude's letter is the antidote for Gnosticism:
8 Likewise also these dreamers defile the flesh, reject authority, and speak evil of dignitaries.
9 Yet Michael the archangel, in contending with the devil, when he disputed about the body of Moses, dared not bring against him a reviling accusation, but said, "The Lord rebuke you!"
10 But these speak evil of whatever they do not know; and whatever they know naturally, like brute beasts, in these things they corrupt themselves.
11 Woe to them! For they have gone in the way of Cain, have run greedily in the error of Balaam for profit, and perished in the rebellion of Korah. (Jude 1:8-11 NKJ)
So God raised Moses up, he is now in heaven waiting to return to the earth with Elijah:
1 And He said to them, "Assuredly, I say to you that there are some standing here who will not taste death till they see the kingdom of God present with power."
2 Now after six days Jesus took Peter, James, and John, and led them up on a high mountain apart by themselves; and He was transfigured before them.
3 His clothes became shining, exceedingly white, like snow, such as no launderer on earth can whiten them.
4 And Elijah appeared to them with Moses, and they were talking with Jesus.
5 Then Peter answered and said to Jesus, "Rabbi, it is good for us to be here; and let us make three tabernacles: one for You, one for Moses, and one for Elijah "--
6 because he did not know what to say, for they were greatly afraid.
7 And a cloud came and overshadowed them; and a voice came out of the cloud, saying, "This is My beloved Son. Hear Him!"
8 Suddenly, when they had looked around, they saw no one anymore, but only Jesus with themselves. (Mk. 9:1-8 NKJ)
3 "And I will give power to my two witnesses, and they will prophesy one thousand two hundred and sixty days, clothed in sackcloth."
4 These are the two olive trees and the two lampstands standing before the God of the earth.
5 And if anyone wants to harm them, fire proceeds from their mouth and devours their enemies. And if anyone wants to harm them, he must be killed in this manner.
6 These have power to shut heaven, so that no rain falls in the days of their prophecy; and they have power over waters to turn them to blood, and to strike the earth with all plagues, as often as they desire.
7 When they finish their testimony, the beast that ascends out of the bottomless pit will make war against them, overcome them, and kill them.
8 And their dead bodies will lie in the street of the great city which spiritually is called Sodom and Egypt, where also our Lord was crucified.
9 Then those from the peoples, tribes, tongues, and nations will see their dead bodies three-and-a-half days, and not allow their dead bodies to be put into graves.
10 And those who dwell on the earth will rejoice over them, make merry, and send gifts to one another, because these two prophets tormented those who dwell on the earth.
11 Now after the three-and-a-half days the breath of life from God entered them, and they stood on their feet, and great fear fell on those who saw them.
12 And they heard a loud voice from heaven saying to them, "Come up here." And they ascended to heaven in a cloud, and their enemies saw them. (Rev. 11:3-12 NKJ)
Wouldn't it be great to be in Jerusalem when they are there preaching!
21 And Elijah came to all the people, and said, "How long will you falter between two opinions? If the LORD is God, follow Him; but if Baal, follow him." But the people answered him not a word.
22 Then Elijah said to the people, "I alone am left a prophet of the LORD; but Baal's prophets are four hundred and fifty men.
23 "Therefore let them give us two bulls; and let them choose one bull for themselves, cut it in pieces, and lay it on the wood, but put no fire under it; and I will prepare the other bull, and lay it on the wood, but put no fire under it.
24 "Then you call on the name of your gods, and I will call on the name of the LORD; and the God who answers by fire, He is God." So all the people answered and said, "It is well spoken."
25 Now Elijah said to the prophets of Baal, "Choose one bull for yourselves and prepare it first, for you are many; and call on the name of your god, but put no fire under it."
26 So they took the bull which was given them, and they prepared it, and called on the name of Baal from morning even till noon, saying, "O Baal, hear us!" But there was no voice; no one answered. Then they leaped about the altar which they had made.
27 And so it was, at noon, that Elijah mocked them and said, "Cry aloud, for he is a god; either he is meditating, or he is busy, or he is on a journey, or perhaps he is sleeping and must be awakened."
28 So they cried aloud, and cut themselves, as was their custom, with knives and lances, until the blood gushed out on them.
29 And when midday was past, they prophesied until the time of the offering of the evening sacrifice. But there was no voice; no one answered, no one paid attention.
30 Then Elijah said to all the people, "Come near to me." So all the people came near to him. And he repaired the altar of the LORD that was broken down.
31 And Elijah took twelve stones, according to the number of the tribes of the sons of Jacob, to whom the word of the LORD had come, saying, "Israel shall be your name."
32 Then with the stones he built an altar in the name of the LORD; and he made a trench around the altar large enough to hold two seahs of seed.
33 And he put the wood in order, cut the bull in pieces, and laid it on the wood, and said, "Fill four waterpots with water, and pour it on the burnt sacrifice and on the wood."
34 Then he said, "Do it a second time," and they did it a second time; and he said, "Do it a third time," and they did it a third time.
35 So the water ran all around the altar; and he also filled the trench with water.
36 And it came to pass, at the time of the offering of the evening sacrifice, that Elijah the prophet came near and said, "LORD God of Abraham, Isaac, and Israel, let it be known this day that You are God in Israel and I am Your servant, and that I have done all these things at Your word.
37 "Hear me, O LORD, hear me, that this people may know that You are the LORD God, and that You have turned their hearts back to You again."
38 Then the fire of the LORD fell and consumed the burnt sacrifice, and the wood and the stones and the dust, and it licked up the water that was in the trench.
39 Now when all the people saw it, they fell on their faces; and they said, "The LORD, He is God! The LORD, He is God!"
40 And Elijah said to them, "Seize the prophets of Baal! Do not let one of them escape!" So they seized them; and Elijah brought them down to the Brook Kishon and executed them there. (1 Ki. 18:21-40 NKJ)
And Moses was no slouch either:
26 then Moses stood in the entrance of the camp, and said, "Whoever is on the LORD'S side-- come to me." And all the sons of Levi gathered themselves together to him.
27 And he said to them, "Thus says the LORD God of Israel:`Let every man put his sword on his side, and go in and out from entrance to entrance throughout the camp, and let every man kill his brother, every man his companion, and every man his neighbor.'"
28 So the sons of Levi did according to the word of Moses. And about three thousand men of the people fell that day. (Exod. 32:26-28 NKJ)
34 "Do not think that I came to bring peace on earth. I did not come to bring peace but a sword.
35 "For I have come to`set a man against his father, a daughter against her mother, and a daughter-in-law against her mother-in-law';
36 "and`a man's enemies will be those of his own household.'
37 "He who loves father or mother more than Me is not worthy of Me. And he who loves son or daughter more than Me is not worthy of Me.
38 "And he who does not take his cross and follow after Me is not worthy of Me.
39 "He who finds his life will lose it, and he who loses his life for My sake will find it.
(Matt. 10:34-39 NKJ)