A search for heavy neutral Higgs bosons is performed using the LHC Run 2 data, corresponding to an integrated luminosity of 139 fb$^{-1}$ of proton-proton collisions at $\sqrt{s}=13$ TeV recorded with the ATLAS detector. The search for heavy resonances is performed over the mass range 0.2-2.5 TeV for the $\tau^+\tau^-$ decay with at least one $\tau$-lepton decaying into final states with hadrons. The data are in good agreement with the background prediction of the Standard Model. In the $M_{h}^{125}$ scenario of the Minimal Supersymmetric Standard Model, values of $\tan\beta>8$ and $\tan\beta>21$ are excluded at the 95% confidence level for neutral Higgs boson masses of 1.0 TeV and 1.5 TeV, respectively, where $\tan\beta$ is the ratio of the vacuum expectation values of the two Higgs doublets.