It happens when a wrapfigure is placed (by the system, not by myself) beside an ExSheets question.
This is a minimal working example:
\documentclass[a4paper,10pt]{book}
\usepackage{fontspec}
\usepackage{mdframed}
\usepackage{amsmath}
\usepackage{xcolor}
\usepackage{wrapfig}
\usepackage{exsheets}
\usepackage{lipsum}
\mdfdefinestyle{noteSty}{backgroundcolor=gray!10, linewidth=0pt, innerleftmargin=1ex, innerrightmargin=1ex, innertopmargin=1ex, innerbottommargin=1ex, innermargin = 0.1cm, outermargin = 0.1cm}
\newcounter{noteCounter}[chapter]
\numberwithin{noteCounter}{chapter}
\newmdtheoremenv[style=noteSty]{note}[noteCounter]{Note}
\SetupExSheets{
headings = block-subtitle ,
subtitle-format = \sc ,
counter-within = {chapter} ,
counter-format = ch.qu[1] ,
label-format = ch.qu[1] ,
headings-format = \bfseries ,
question/pre-hook = \vspace{1ex} ,
question/post-hook = \vspace{1ex} ,
question/pre-body-hook = {\vspace{1ex} \mdframed[innermargin=+1cm,outermargin=+1cm]},
question/post-body-hook = \endmdframed
}
\begin{document}
\lipsum[1-2]
\begin{wrapfigure}{r}{0.6\linewidth}
\begin{note}{Lorem ipsum}
\lipsum[3]
\end{note}
\end{wrapfigure}
\begin{figure}
\includegraphics[width=0.9\linewidth]{lipsum.jpg}
\caption{dolor sit amet}
\label{fig:lipsum}
\end{figure}
\begin{question}
\lipsum[66]
\end{question}
\lipsum[6-7]
\end{document}
This is the dummy image I use in it (in case you want to compile it as is):
This is how the second page appears to me:
I'm using Overleaf with LuaLaTex.
The question below is similar to this, but I can't related them in a productive way.


wrapfigis often causing trouble and you always need to adjust by hand. There might be better ways to achieve what you want. – Johannes_B Dec 19 '15 at 16:47questionenvironment which causes the problem. Since this is expected, I think you either have to rethink your design or think about another way of implementing it. – cfr Dec 19 '15 at 22:51