Conditions for a Function $T\colon\mathbb{R}^{n\times n}\rightarrow \mathbb{R}^{n\times n}$ to Drop Rank

Let $$T\colon\mathbb{R}^{n\times n}\rightarrow \mathbb{R}^{n\times n}$$ and suppose that $$\text{rank} \ T(I_n) = n$$. Under what conditions is it true that there exists a neighborhood $$N_I$$ of the identity such that, for all $$A\in N_I$$, $$\text{rank} \ T(A) = n$$?

Can stronger conditions be provided in the case where the range of the function is a subset of the positive semidefinite matrices of dimension $$n$$?

$$T$$ being continuous at $$I_n$$ is sufficient.
All $$(n-1)\times(n-1)$$ minors of $$T(I_n)$$ are non-zero, minors are continuous functions, and there are only finitely many of them, meaning there is some $$\varepsilon>0$$ such that we have an open ball of radius $$\varepsilon$$ around $$T(I_n)$$ with only invertible matrices. By continuity of $$T$$, there is a $$\delta>0$$ such that setting $$N_I$$ to be the open $$\delta$$-ball around $$I$$ works.