Measurement of the cross section for hard exclusive $π^0$ leptoproduction