The answer to this gets trickier in high school. A missed field goal is treated as a punt.
In my senior year in high school, I began punting, but was already an accomplished placekicker. I averaged 30 yards from scrimmage on my punts. As a placekicker, I would kick the ball from 50 to 55 yards, and sometimes 60 yards, on the fly from the point of the kick, which meant that I could placekick the ball 43 to 53 yards from the scrimmage line (because a placekick is teed up 7 yards behind the line of scrimmage). And that doesn't count any potential roll if it is not caught.
With the ball on the 48, we tried a 65-yard field goal, and the ball landed 2 yards in front of the goal posts. The other team got the ball on the 20, so we had a 28 yard net gain, about the same if I had punted, plus we had the possible advantage that we would have gotten 3 points if it had gone another 4 or 5 yards. Had the ball been it been on the 20, it would have carried from our own 13-yard line all the way to the 20 - 55 yards, assuming it was caught.
Covering a field goal attempt is harder from field goal formation. My solution would be to simply kick the ball out of bounds every time we weren't in field goal range. We still would have netted 40 yards a kick, and no returns, because it's far easier to placekick accurately out of bounds than to punt to a location.
With the ball on the 2, there is no need for punter to be backed up against the end line. The tee would be placed 5 yards deep in the end zone, and the kicker would have plenty of room.
I'm not sure why high school teams with good kickers don't do this.