  A search for direct pair production of scalar partners of the top quark (top
squarks or scalar third-generation up-type leptoquarks) in the all-hadronic
$t\bar{t}$ plus missing transverse momentum final state is presented. The
analysis of 139 fb$^{-1}$ of ${\sqrt{s}=13}$ TeV proton-proton collision data
collected using the ATLAS detector at the LHC yields no significant excess over
the Standard Model background expectation. To interpret the results, a
supersymmetric model is used where the top squark decays via $\tilde{t} \to
t^{(*)} \tilde{\chi}^0_1$, with $t^{(*)}$ denoting an on-shell (off-shell) top
quark and $\tilde{\chi}^0_1$ the lightest neutralino. Three specific event
selections are optimised for the following scenarios. In the scenario where
$m_{\tilde{t}}> m_t+m_{\tilde{\chi}^0_1}$, top squark masses are excluded in
the range 400-1250 GeV for $\tilde{\chi}^0_1$ masses below $200$ GeV at 95 %
confidence level. In the situation where $m_{\tilde{t}}\sim
m_t+m_{\tilde{\chi}^0_1}$, top squark masses in the range 300-630 GeV are
excluded, while in the case where $m_{\tilde{t}}< m_W+m_b+m_{\tilde{\chi}^0_1}$
(with $m_{\tilde{t}}-m_{\tilde{\chi}^0_1}\ge 5$ GeV), considered for the first
time in an ATLAS all-hadronic search, top squark masses in the range 300-660
GeV are excluded. Limits are also set for scalar third-generation up-type
leptoquarks, excluding leptoquarks with masses below $1240$ GeV when
considering only leptoquark decays into a top quark and a neutrino.
