So what? The theorem does not say that any immersed submanifold must be a leaf of a foliation. Nor does it give any conditions that tell you whether an immersed submanifold is or is not a leaf of a foliation. So the theorem has nothing to say about your lemniscate curve.My concern is that Frobenius theorem (as stated here) involves immersed submanifolds and the Lemniscate curve is an immersed submanifold in ##\mathbb R^2##.
The fact that the words "immersed submanifold" appear in your reference's statement of the theorem does not mean that the theorem must automaticallly decide all questions you have about immersed submanifolds.