What's wrong with your approach is that it has almost nothing to do with the game.
If you roll a $5$ and decide to roll again, you cannot go back
and claim that $5$ as your score. So the question is not, "Will I roll a six
in the remaining rolls?" Rather, the question is, "If I decide to roll again
and play the remaining rolls optimally, what is my expected final score?"
The expected final score includes not only the possibility that you
might roll a $6$, but also the possibility that you might end up with
a score of $1$. Or $2$, or $3$, or $4$, or $5$.
We get the expected value by multiplying each score by the probability
that you will end up with that score, and add up the resulting numbers
to get your expected value.
The expected value is generally considered a good way to take into account
the fact that you might lower your score by deciding to roll again,
a possibility that (as a comment pointed out)
your approach does not account for.
In that sense, your approach is unrealistically optimistic about rolling again.
On the other hand, the expected wait until the next $6$ takes into account the possibility that it might take $7$ rolls, or $8$, or $9$ until a six appears,
each of those possibilities multiplied by its own probability.
But if you only have six rolls left, it doesn't make any difference to
you whether it would take $7$, $8$, $9$, or more rolls to get a six,
because you cannot make those rolls.
In that sense, your approach is unrealistically pessimistic about rolling again.
So not only does your approach not tell us exactly how many rolls must
remain to make it worthwhile to re-roll on a $5$, it does not even
give us either a lower or upper bound for the number of rolls.
The required number of rolls might be more or less than six depending on
whether your algorithm's error on the optimistic side outweighed its
error on the pessimistic side, or vice versa.
TLDR: The waiting time until the next $6$ doesn't tell us anything about
how to play this game.