Measurement of flow harmonics correlations with mean transverse momentum in lead–lead and proton–lead collisions at $$\sqrt{s_{\mathrm{NN}}} = 5.02~\hbox {TeV}$$sNN=5.02TeV with the ATLAS detector