  We numerically investigate the critical behavior of the Hubbard model on the
honeycomb and the $\pi$-flux lattice, which exhibits a direct transition from a
Dirac semimetal to an antiferromagnetically ordered Mott insulator. We use
projective auxiliary-field quantum Monte Carlo simulations and a careful
finite-size scaling analysis that exploits approximately improved
renormalization-group-invariant observables. This approach, which is
successfully verified for the three-dimensional XY transition of the
Kane-Mele-Hubbard model, allows us to extract estimates for the critical
couplings and the critical exponents. The results confirm that the critical
behavior for the semimetal to Mott insulator transition in the Hubbard model
belongs to the Gross-Neveu-Heisenberg universality class on both lattices.
