Performance of the ATLAS track reconstruction algorithms in dense environments in LHC Run 2