That's the biggest mistake we make as gamblers, and I'm also guilty of doing that on a lot of occasions where I could get almost 100% on top of my initial bankroll but just because I wanted to reach a certain target that I had in my mind, I lost everything back and that hurts real bad. I'm not an addicted or regular gambler, so I don't gamble all the time, but when I do, now that I've learned my lesson, I make sure that I have a limit for both wins and losses.
For losses, I simply stop when I lose the bankroll that I have deposited and I only deposit a moderate amount that I wouldn't worry about even if I lose it all, and for wins, I stop when I feel that I have got enough profit for the day instead of thinking that I might be able to get some more if I keep playing because I know that's a death trap.
If you look at this scenario deeply, you will understand that setting the limits for wins and also setting the limits for loses is not that necessary. If you can successfully set the limits for your loses (which means how much money you are willing to gamble), I think you are safe. When you are approaching your limit, you will simply back out for the day.
The main thing that reck gamblers is not winning and being anxious to win more. The major thing that makes gamblers lose excessively is chasing losses (when you discover that your loses are greater than your wins and you want to change the narrative by all means).