I want my document to not start new pages when there is a new chapter.
My code is the following: 

```
\documentclass{scrbook}
\usepackage{etoolbox}

\patchcmd{\chapter}{\clearpage}{}{}
\begin{document}

\chapter{Preliminary}
first chapter

\chapter{Discussion}
second chapter

{\let \clearpage \relax\chapter{Advanced}}
final chapter
\end{document}

```

This code will start new pages for the first and second chapters but not for the third one.

Why is my \patchcmd not working?