  X-ray observations of galaxy clusters are impacted by the presence of active
galactic nuclei (AGNs) in a manner that is challenging to quantify, leading to
biases in the detection and measurement of cluster properties for both
astrophysics and cosmological applications. We detect and characterise clusters
contaminated by central AGNs within the XXL survey footprint and provide a
systematic assessment of the cosmological impact of such systems in X-ray
cluster samples. We introduce a new automated class for AGN-contaminated (AC)
clusters in the XXL source detection pipeline. The majority of these systems
are otherwise missed by current X-ray cluster-detection methods. The AC
selection is also effective in distinguishing AGN and cool-core presence using
supplementary optical and infrared information. We present 33 AC objects,
including 25 clusters in the redshift range, $0.14 \leq z \leq 1.03$, and eight
other sources with significantly peaked central profiles. Six of these are new
confirmed clusters. We computed the missed fraction of the XXL survey, which is
defined as the fraction of genuine clusters that are undetected due to their
centrally peaked X-ray profiles. We report seven undetected AC clusters above
$z > 0.6$, in the range where X-ray cluster detection efficiency drops
significantly. The missed fraction is estimated to be at the level of $5\%$ for
the 50 square-degree XXL area. The impact on cosmological estimates from missed
clusters is negligible for XXL, but it produces a tension of $\sim 3\sigma$
with the fiducial cosmology when considering larger survey areas. Looking
towards surveys such as eROSITA and \textit{Athena}, larger areas and increased
sensitivity will significantly enhance cluster detection, and therefore robust
methods for characterising AGN contamination will be crucial for precise
cluster cosmology, particularly in the redshift $z > 1$ regime.
