  $T\overline{T}$-deformed two-dimensional quantum Maxwell theory on the torus
is examined, taking into account nonperturbative effects in the deformation
parameter $\mu$. We study the deformed partition function solving the relevant
flow equation at the level of individual flux sectors. Summing exactly the
"instanton" series, we obtain a well-defined expression for the partition
function at arbitrary $\mu$. For $\mu>0$, the quantum spectrum of the theory
experiences a truncation, the partition function reducing to a sum over a
finite set of positive-energy states. For $\mu<0$ instead, the appearance of
nonperturbative contributions in $\mu$ drastically modifies the structure of
the partition function, regularizing its naive divergences through
instanton-like subtractions. For each flux sector, we show that the
semiclassical contribution is dominated by the deformed classical action. The
theory is observed to undergo infinite-order phase transitions for certain
values of $\mu$, associated with the vanishing of Polyakov-loop correlators.
