\documentclass{book}
\usepackage[tocindentauto]{tocstyle}


\usepackage{xepersian}
\settextfont[Script=Arabic,Scale=1]{XB Zar}
\setlatintextfont[Scale=1]{Times New Roman}


\begin{document}
\tableofcontents
\addtocounter{chapter}{10000}
\chapter{تست}
\section{تست}
\subsection{تست}

\end{document}