It was the only call that could have been made. What that gif does not show is that after he hung on the rim, he flexes and yells. That was an easy and correct call.
That was what I saw from the baseline cam. I do not see any dangerous player beneath him nor did I in real time. He was on a break and deliberately pulled up till his legs almost came up to the stancions.
HS refs are gonna call that especially when coupled with showing out after it is done. That gif carefully omits the post dunk yell that was coupled together. If there was any doubt in the stripes mind to let that go the next 2 seconds made up his mind. Too much potential for equipment failure or hands slipping off the rim and the player landing flat on his back. Ever seen a kid grab a rin and his hands slip off. AAU tourney and a concussion with a possible skull fracture will cure you of supporting that. Even worse is the rim that is tweaked or broken causing a move in venue. Seen both...changed my mind on the efficacy and enforcement of the rule.