In Exercise 5.5 of Ziller's notes (https://www.math.upenn.edu/~wziller/math650/LieGroupsReps.pdf) it is asked the following.
Let $\mathfrak{g}$ be a real Lie algebra and $\pi \colon \mathfrak{g} \rightarrow \mathfrak{gl}(V)$ a complex representations with $\tilde{\pi}$ is extension to $\mathfrak{g}\otimes \mathbb{C}$. Show that $\pi$ is irreducible if and only if $\tilde{\pi}$ is irreducible.
I think I can prove one that if $\pi$ is irreducible, then $\tilde{\pi}$ is also irreducible.
Let us suppose that $\pi$ is irreducible, and that $W\subset V$ is such that $\tilde{\pi}(X+i Y) W \subset W$ for all $X, Y\in \mathfrak{g}$. In particular, $\tilde{\pi}(X)W=\pi(X)W\subset W$ for every $X\in \mathfrak{g}$. This implies that $W=0$ or $W=V$ since $\pi$ is irreducible. Hence, $\tilde{\pi}$ is irreducible.
However, I can't prove the other implication. Indeed, I came up with the following counterexample. Let $\pi\colon \mathbb{R} \rightarrow \mathfrak{gl}(\mathbb{C})$ be the representation given by $\lambda \in \mathbb{R} \mapsto \lambda$ $\textrm{Id}$, where $\textrm{Id}(z)=z$, for every $z\in \mathbb{C}$. Then, $\tilde{\pi}(\lambda + i \mu)(z)=(\lambda + i \mu)z$, for $\lambda,\mu\in \mathbb{R}$. Here, we have that $\tilde{\pi}$ is irreducible but $\pi$ is not because $\{z\in \mathbb{C} : \textrm{Im}(z)=0\}$ is an invariant subspace.
There has to be something that I am not understanding right.