Toss two coins until two Heads and two Tails come up You play a game where you toss two fair coins in the air. You always win $1. However, if you have tossed 2 heads at least once, and 2 tails at least once, you surrender all winnings, and cannot play again. You may stop playing at anytime. What’s your strategy?

My thoughts were that this seems similar to the coupon collector. We have two bad events (2H and 2T). So after the occurence of the first bad event the second one will occur in an expected number of 4 turns. So my strategy is to stop after 3 tosses from the moment the first bad event occured.
However, I can't prove it.
After the first bad event one has $x\geq1$ dollars in the pocket. The question is whether one shall go on playing. Denote by $E(x)$ the expected total win under the best strategy in this situation. If we decide to quit we have won $x$, and if we make a next turn we have (with probability ${3\over4}$) won $x+1$  and the possibility of further play, or (with probability ${1\over4}$) we have won $0$. This shows that
$$E(x)=\max\left\{x, \ {3\over4}E(x+1)\right\}\ .\tag{1}$$
I'm assuming (without proof) that there will be an $n$ where we definitely won't play once more; hence $E(n)=n$. From this and $(1)$  we get
$$E(n-1)=\max\left\{n-1,\ {3\over4}n\right\}=n-1\qquad(n\geq4)\ .$$
By downwards induction it follows that
$$E(n)=n\qquad(n\geq 3)\ .$$
Using $(1)$ one then computes
$$E(2)=\max\left\{2,\ {3\over4}E(3)\right\}={9\over4}\ ,\qquad E(1)=\max\left\{1,\ {3\over4}E(2)\right\}={27\over16}\ .$$
This means that one should play on when $1\leq x\leq2$, and quit otherwise.
If while playing the game,  the latest 3 tosses are HHT or TTH, then in the next move, you have a $50\%$ chance of losing. If you take the chance and manage to stay in the game, you again have a $50\%$ chance of losing. However the total probability of the game going in your favour will be $25\%$ by the second move itself. So, it somewhat depends on the amount of money you have already won. If the game goes something like HTHTHHTor HTHHHHHT and you have already won $7-8\$$, then you should not take the $50\%$ chance. However, if you have won only $3-4\$$, then you may take the chance as you have little to lose, but after that, it is best to stop playing as a $25\%$ chance clearly doesn't seem optimal.