When I use the command \numberwithin{section}{part} the table of contents formatting gets destroyed.
A minimal working example is the following:
\documentclass[a4paper,12pt]{scrartcl}
\usepackage{amsmath}
\numberwithin{section}{part}
\begin{document}
\tableofcontents{}
\newpage
\part{First PArt}
\section{First Section}
\section{Next Section}
\subsection{abc}
\subsection{ABC}
\part{Second PArt}
\section{The third Section}
\section{And another Section}
\subsection{This is an example}
\subsection{Example ;-)}
\part{Third Part}
\section{Wrong formatting}
\section{Another Section}
\section{Test Section}
\subsection{xyz}
\subsection{XYZ}
\end{document}
This yields the following table of contents: (I compile with Lualatex, if that is relevant)

As one can see the space between the numbering and the title of the sections is wrong and in case of Part 3 even overlaps.
How can I fix this?
