  Computing the entanglement entropy in confining gauge theories is often
accompanied by puzzles and ambiguities. In this work we show that compactifying
the theory on a small circle $\mathbb S^1_L$ evades these difficulties. In
particular, we study Yang-Mills theory on $\mathbb R^3\times \mathbb S^1_L$
with double-trace deformations or adjoint fermions and hold it at temperatures
near the deconfinement transition. This theory is dual to a multi-component
(electric-magnetic) Coulomb gas that can be mapped either to an XY-spin model
with $\mathbb Z_p$-preserving perturbations or dual Sine-Gordon model. The
entanglement entropy of the dual Sine-Gordon model exhibits an extremum at the
critical temperature/crossover. We also compute Renyi mutual information (RMI)
of the XY-spin model by means of the replica trick and Monte Carlo simulations.
These are expensive calculations, since one in general needs to suppress lower
winding vortices that do not correspond to physical excitations of the system.
We use a T-duality that maps the original XY model to its mirror image, making
the extraction of RMI a much efficient process. Our simulations indicate that
RMI follows the area law scaling, with subleading corrections, and this
quantity can be used as a genuine probe to detect deconfinement transitions. We
also discuss the effect of fundamental matter on RMI and the implications of
our findings in gauge theories and beyond.
