Most theorems stating that transversality is an open condition look like:
We have manifolds $M$, $N$, and a submanifold $A\subseteq N$. Then assuming $A$ is closed in $N$, in the appropriate topology on the space of smooth maps $C^\infty(M,N)$ (weak/compact-open topology if $M$ is compact, or strong/Whitney topology if $M$ is noncompact), the maps transverse to $A$ form an open dense subset.
However, I don't understand why this condition $A$ closed in $N$ is needed. I was trying to see if there are counterexamples for it.
For reference, here is Hirsch's statement (Differential Topology, Chapter 3):
And also from this bachelor thesis https://www.math.harvard.edu/media/ThesisXFinal.pdf:
Obs: This post (Reference for transversality -- relative version) seems related, but I'm not sure it answers this question. The answer in it seems to explain why $A$ closed in $N$ matters, but only if we're not asking transversality in all of $M$.