This paper presents a search for direct top squark pair production in events with missing transverse momentum plus either a pair of jets consistent with Standard Model Higgs boson decay into b-quarks or a same-flavour oppositesign dilepton pair with an invariant mass consistent with a Z boson. The analysis is performed using the proton–proton collision data at √s = 13 TeV collected with the ATLAS detector during the LHC Run-2, corresponding to an integrated luminosity of 139 fb−1. No excess is observed in the data above the Standard Model predictions. The results are interpreted in simplified models featuring direct production of pairs of either the lighter top squark (t ˜ 1) or the heavier top squark (t ˜ 2), excluding at 95% confidence level t ˜ 1 and t ˜ 2 masses up to about 1220 and 875 GeV, respectively.