  We study a model of fermions on the square lattice at half-filling coupled to
an Ising gauge theory, that was recently shown in Monte Carlo simulations to
exhibit $\mathbb{Z}_2$ topological order and massless Dirac fermion
excitations. On tuning parameters, a confining phase with broken symmetry (an
antiferromagnet in one choice of Hamiltonian) was also established, and the
transition between these phases was found to be continuous, with co-incident
onset of symmetry breaking and confinement. While the confinement transition in
pure gauge theories is well understood in terms of condensing magnetic flux
excitations, the same transition in the presence of gapless fermions is a
challenging problem owing to the statistical interactions between fermions and
the condensing flux excitations. The conventional scenario then proceeds via a
two step transition, involving a symmetry breaking transition leading to gapped
fermions followed by confinement. In contrast, here, using large scale quantum
Monte Carlo simulations, we provide further evidence for a direct, continuous
transition and also find numerical evidence for an enlarged $SO(5)$ symmetry
rotating between antiferromagnetism and valence bond solid orders proximate to
criticality. Guided by our numerical finding, we develop a field theory
description of the direct transition involving an emergent non-abelian
($SU(2)$) gauge theory and a matrix Higgs field. We contrast our results with
the conventional Gross--Neveu--Yukawa transition.
