Charm and beauty quarks are expected to form on a shorter time scale with respect to the strongly
interacting medium, Quark-Gluon Plasma (QGP), produced in high-energy heavy-ion collisions.
Therefore, expecting the full evolution of the collision, they are effective probes to study the
mechanisms of parton energy loss and hadronisation in the hot and dense medium, giving insight on
the QGP evolution and its transport coefficients.
The heavy-flavour nuclear modification factor
($R_{\rm AA}$) is one of the key observables which
allows investigate the interaction strength of heavy
quarks with the medium constituents.
We report on the latest measurements of the $R_{\rm AA}$ of open heavy-flavour hadrons via semi-leptonic
decays to electrons at mid-rapidity and muons at forward rapidity in Pb-Pb collisions and Xe-Xe collisions with ALICE at LHC.
Comparisons with model calculations
including the interaction of heavy quarks with the hot, dense, and deconfined medium will be also
shown.