  gamma Cas is known for its hard and intense X-ray emission that could trace
accretion by a compact companion, wind interaction with a hot sub-dwarf
companion, or magnetic interaction between the star and its Be decretion disc.
These scenarios should lead to diverse dependences of the hard X-ray emission
on disc density. We collected X-ray observations of gamma Cas during an episode
of enhanced disc activity around January 2021. We investigate the variations in
the disc properties using time series of dedicated optical spectroscopy and
existing broadband photometry. Epoch-dependent Doppler maps of the H-alpha,
H-beta, and He I 5876 emission lines are built to characterise the emission
regions in velocity space. We analyse 4 XMM-Newton observations taken at key
phases of the enhanced disc activity episode. Archival data are used to study
the long-term correlation between optical and X-ray emission. Optical
spectroscopy unveils an increase in the radial extent of the emission regions
during the episode of enhanced disc activity, whilst no increase in the V-band
flux is recorded. Doppler maps do not reveal any stable feature in the disc
resulting from the putative action of the companion on the outer parts of the
Be disc. No increase in the hard emission is observed in relation to the
enhanced disc activity. However, at two occasions, the soft X-ray emission of
gamma Cas is strongly attenuated, suggesting more efficient obscuration by a
large flaring Be disc. There is a strong correlation between the long-term
variations in the X-ray flux and in the V-band photometry. The observed
behaviour of gamma Cas suggests no direct link between the properties of the
outer regions of the Be disc and the hard X-ray emission, but favours a link
between the level of X-ray emission and the properties of the inner part of the
Be disc. These results thus disfavour an accretion or colliding wind scenario.
