This answer explains some positive results. Let $B$ be a smooth complex variety, and let $\pi:Y\to B$ be a smooth, projective morphism with connected fibers of dimension $n$. Let $E_B$ and $F_B$ be locally free $\mathcal{O}_Y$-modules of ranks $e$ and $f$. Let $\varphi_B:E_B\to F_B$ be a morphism of $\mathcal{O}_Y$-modules. For every nonnegative integer $k\leq \text{min}(e,f)$, let $D_{\leq k}(\varphi_B)$ denote the maximal closed subscheme of $Y$ on which the rank of $\varphi_B$ is $\leq k$. Denote by $B^o\subseteq B$ the maximal open subscheme such that for every nonnegative integer $\ell\leq k$, either $D_{\leq \ell}(\varphi_B)$ is empty if $(e-\ell)(f-\ell) > n$, or, if $(e-\ell)(f-\ell) \leq n$, thenthe scheme $D_{\leq \ell}(\varphi_B)\setminus D_{\leq (\ell-1)}(\varphi_B)$ is smooth over $B^o$ and every (nonempty) connected component of every geometric fiber has pure dimension $n-(e-\ell)(f-\ell)$. In other words, $B^o$ is the maximal open subscheme of $B$ over which each $D_{\leq \ell}(\varphi_B)$ is transversal. Denote by $Z\subset B$ the closed complement of $B^o$. Denote by $E\subset Z$ the union of all irreducible components of $Z$ that are divisors in $B$.
Now let $X$ be a smooth, projective complex variety. Let $E$ and $F$ be locally free $\mathcal{O}_X$-modules of ranks $e$ and $f$ such that the locally free $\mathcal{O}_X$-module $\textit{Hom}_{\mathcal{O}_X}(E,F)$ is globally generated. Denote by $B$ the complex affine space of the (finite-dimensional) complex vector space $\text{Hom}_{\mathcal{O}_X}(E,F)$, i.e., there is a universal morphism of coherent sheaves $\varphi_B:\text{pr}_2^*E\to \text{pr}_2^*F$ on the product variety $B\times X$. Denote the product $B\times X$ by $Y$ with its first projection $\pi$ from $Y$ to $B$. Denote $\text{pr}_2^*E$ and $\text{pr}_2^*F$ by $E_B$ and $F_B$. Denote the universal $\mathcal{O}_Y$-module homomorphism from $E_B$ to $F_B$ by $\varphi_B$.
Proposition. (1) The open subscheme $B^o$ of $B$ is dense, i.e., it is not empty.
(2) Assume that $n-(e-k)(f-k)$ is positive and that
$D_{\leq k}(\varphi_B)$ surjects to $B$. Then every (nonempty) connected component of the
fiber of $D_{\leq k}(\varphi_B)$ over each generic point of $E$ has pure dimension $n-(e-k)(f-k)$, but it may be nonreduced.
(3) AssumingAssume also that leastthe greatest common multiple ofdivisor equals $1$ for the multiplicities of the irreducible components of each connected component of the fiber of $D_{\leq k}(\varphi_B)$ equals $1$ for each generic point of $E$, then. Then every fiber of $D_{\leq k}$ over every point of $B$ is connected.