Your approach results in a different (and sub-optimal) expectation because your choice of stopping rule is not the same as the one in the answer you cited. For it is not at all obvious that your rule, which is to stop drawing if you obtain a number exceeding $50$, should maximize the expectation. Why stop there? You know that the probability to obtain such a number is $1/2$, but maybe you are better off picking a higher threshold to stop, knowing that it only costs one dollar to play again.
For example, suppose we stop when the number drawn $X$ exceeds $55$, not $50$. Then, there are $45$ numbers that stop the game and the expectation is $$\operatorname{E}[X] = \frac{45}{100}\cdot 78 + \frac{55}{100} \cdot\operatorname{E}[X - 1],$$ which upon solving yields $$\operatorname{E}[X] = \frac{691}{9} \approx 76.77778.$$ That improves upon your expectation, and shows that there is still an additional benefit to trade off more expected draws/plays in exchange for a higher stopping threshold. The solution you cited seeks to find that threshold by allowing it to vary, then finding when the resulting expectation calculation is maximized.
To make things more interesting and generalize the question in other ways, suppose we change the cost of playing the game. Instead of $1$ per round, what if it costs $2$ per round? You can see that this will also affect your choice of cutoff, decreasing it because as it becomes more expensive to play, the more conservative you must be. I invite the reader to modify the solution cited in the link to generalize it to the case where the numbers are in some arithmetic progression, say $$\{a, a+d, a+2d, \ldots, a+(n-1)d\},$$ and the cost per play is $c$. What if the numbers are in geometric progression, say $$\{a, ar, ar^2, \ldots, ar^{n-1}\},$$ where $a > 0$ and $r > 1$?