# Why is thmtools and mdframed not working with parskip

I have the following MWE:

    %!TEX TS-program = XeLaTeX
%!TEX encoding = UTF-8 Unicode

% DEFINITIONS ===================================================
\documentclass[
12pt,
a4paper,
twoside,
titlepage=true
]{scrreprt}

\usepackage[centertags]{amsmath}
\usepackage[framemethod=TikZ]{mdframed}
\usepackage{amsthm}
\usepackage{thmtools}

\usepackage{lipsum}

\declaretheoremstyle[
notebraces={[}{]},
bodyfont=\normalfont\itshape,
spacebelow=0,
spaceabove=0,
mdframed={
linecolor=red,
outerlinewidth=3pt,
innertopmargin=0pt,
roundcorner=5pt,
innerbottommargin=0pt,
skipabove=-\parskip,
skipbelow=0 }
]{myFramedDefinitionStyle}%

\declaretheorem[
style=myFramedDefinitionStyle,
name=Definition,
numberwithin=chapter
]{example1}

% Basic Command
\ExplSyntaxOn
\NewDocumentEnvironment{example} { o o }
{%
\IfNoValueTF{#1} {\begin{example1}}{ \begin{example1}[#1] }%
\IfNoValueTF{#2} {}{\label{#2}}%
}%
{%
\end{example1}%
}%
\ExplSyntaxOff

\begin{document}
\setlength{\parskip}{5mm}
\lipsum[1]
\begin{example}
asdasd
\end{example}
\lipsum[1]
\begin{example}
asdasd
\end{example}
\end{document}


Which results in this output, and I am really asking what I am doing wrong? Why is parksip messing up the boxes? Also the workaround from LINK does not help? Does anybody know why this mdframed with thmtools behaves so badly?

Thanks a lot! :-)!!

I think your problem is that you spelled parskip as parsep. That is, if you change the four instances of \parsep into four \parskips, then it seems to work as you intended (or at least better).
Edited to add: Now you have (inside the mdframed) a negative value of skipabove, so it seems reasonable that it overlaps with the previous paragraph. Try skipabove=2\parskip or something similar.