Let $R$ be a prime ring with its Utumi ring of quotients $U$, $C=Z(U)$ extended centroid of $R$, $F$ a nonzero generalized derivation of $R$, $L$ a noncentral Lie ideal of $R$ and $k\geq 2$ a fixed integer. Suppose that there exists $0\neq a\in R$ such that $a[F(u^{n_1}),u^{n_2},\ldots,u^{n_k}]=0$ for all $u \in L$, where $n_1, n_2, \ldots, n_k\geq 1$ are fixed integers. Then either there exists $\lambda\in C$ such that $F(x)=\lambda x$ for all $x\in R$, or $R$ satisfies $s_4$, the standard identity in four variables.