Remember that variance of every random variable X is a positive value
If you want to learn more, I suggest reading about Jensen’s Inequality and the Kelly Criterion. Both can illustrate why the two maximizations lead to different optimal solutions. Jensen: [link] Kelly:
Remember that variance of every random variable X is a positive value