Gazebo Height Planning
In the U.S., that’s a Planning Commission decision not a Building Code issue. I’d go in (or call them) and explain the situation.
Here, some jurisdictions will allow you to do what you suggest and some will even allow you to pile dirt against a structure to keep it below the maximum height allowed. Other jurisdictions take the average height of the existing building site.