In order to answer this question, the umpire must look beyond the rule and case book for HS. The reason is because this point in HS baseball, batted ball hits top of the fence for HR, is not covered. No amount of stringing HS rules together will get you there. So it's futile to attempt to do so.
Umpires will use interpretation books when specific rule situations are not covered by the rule books. Examples of these books are the "Rules of Professional Baseball" written by Jaker and Roder and "The Baseball Rules Difference" (BRD) written by Carl Childress.
Section 22 of the BRD, Awards to: BR: Batted ball hits top of fence and goes over, states that this point is not covered in FED (HS). Use interpretation by Brad Rumble, former rules interpreter for FED.
Rumble: "It is a HR if a batted ball hits on top of the outfield fence and then bounds over in fair territory."
NCAA: Same as Fed interpretation. See also NCAA 7-6 AR 2
That AR (approved ruling) states, "If a batted ball hits the top of the fence while in fair territory and then bounces over the fence, it is a home run."
So to answer the OP's question it is a home run. As an umpire, I can't just tell you it is because I feel it in my bones. I have to have some definitive proof as per the example I have shown above.