I know that as gamblers, everyone can relate to this question, as we have surely experienced it in real situations.
Suppose our bankroll is $100 and it has already grown to $500, would you quit or continue? Conversely, if with our bankroll, we are down to $10, would you still continue or save the remaining $10? I used specific amounts to make it easier to discuss this situation. I understand that we all gamble with different amounts based on our income, but consider this as an example. You can mention any amount you want based on your personal experience; it doesn't matter.
So, I play with very well-established limits.
So, I only deposit what I am willing to lose into the casino and, before I start playing, I decide how much I am going to spend on game A or B. That way, I always play until my balance is zero.
However, I confess that the maximum winning limit is a problem for me.
If I start playing with $100 and reach $500, I will hardly be able to stop playing, because the adrenaline is a very strong factor in controlling it.
What has worked for me is to realize the profits and immediately withdraw part of that amount.
In other words, if I reach a balance of $500, I will withdraw half of it to my personal wallet and continue playing with the other half.
If I multiply that amount again, I will make a new withdrawal. This allows me to continue playing in favor of the tide of luck but without the risk of losing everything I have already won.