  We propose a novel variational ansatz for the ground-state preparation of the
$\mathbb{Z}_2$ lattice gauge theory (LGT) in quantum simulators. It combines
dissipative and unitary operations in a completely deterministic scheme with a
circuit depth that does not scale with the size of the considered lattice. We
find that, with very few variational parameters, the ansatz can achieve
$>\!99\%$ precision in energy in both the confined and deconfined phase of the
$\mathbb{Z}_2$ LGT. We benchmark our proposal against the unitary Hamiltonian
variational ansatz and find a clear advantage of our scheme, especially when
focusing on the nature of the confinement-deconfinement transition of the
$\mathbb{Z}_2$ LGT. After performing a finite-size scaling analysis, we show
that our dissipative variational ansatz can predict critical exponents with
reasonable accuracies even for reduced qubit numbers and circuit depths.
Furthermore, we investigate the performance of this variational eigensolver
subject to circuit-level noise, determining variational error thresholds that
fix the error rate $p_{\ell}$ below which $p<p_{\ell}$ it would be beneficial
to increase the number of layers $\ell\mapsto \ell'> \ell$. In light of these
quantities and for typical gate errors $p$ in current quantum processors, we
provide a detailed assessment of the prospects of our scheme to explore the
$\mathbb{Z}_2$ LGT on near-term devices.
