Is there a symplectic manifold $(M,\omega)$ equipped with a Riemannian metric such that $d^* \omega \wedge dd^*\omega=0$ and there is a compact leaf for the foliation of $M\setminus S$ defined by $d^* \omega =0$ where $S$ is the singular points of $d^* \omega$?
In dimension $2$ the answer is negative since we lead to a gradient vector field which has no any closed orbit.