Can you prove Kaguya used IT on Hagoromo and Hamura ?
No you can't ... Because she never used it on her sons (Proof : Hagoromo didn't know about IT) ... So Hamura had nothing to do with IT .
IT is world wide jutsu. It will hit everything and only susanoo combined with rinnegan can defend other people.
As i have said before your reading comprehension is very poor. Hagoromo has to research how to dispell IT, not that he didnt get attacked by IT. In fact saying Kaguya never used IT on her son when IT is world wide is very stupid.
IT was being casted at the point before Kaguya and Juubii got sealed.
Only Susanoo combined with Rinnegan can block the IT and shields other people.
Only Rinnegan combined with all Tailed Beasts chakra can be used to dispell IT.
Hagoromo only has all tailed beasts chakra AFTER sealing Kaguya/Juubii.
Haruma must able to resist IT in order for the story being connected and corrected since all the evidents and timeline proved that Haruma withstand IT and fought along with Hagoromo to seal the Juubii/Kaguya.
Hagoromo never had Susanoo only his son had Susanoo because of mutant gen, so he can not shield Haruma nor dispell IT.
Byakugan user got trapped by IT, so what Haruma has left is his sage/rikudou mark on his body/clothes and his tsb that in form of a staff.