This is the right state of mind, but there are not many gamblers that think like this, since they see those limitations as a way to restrict their fun and they do not know how to function within those limits, so instead they prefer to gamble as freely as possible thinking that it is not possible for them to lose that much money anyway, and those are the people that are the most susceptible to losing huge amounts of cash, as they will not realize this happened until it is too late to do anything about it.
It's not that they don't know they are going to lose a lot of money if they gamble freely but they don't have enough patience to do that and they might use this as an excuse by saying that they didn't think that they can lose a lot of money if they gamble this way because even a kid would know this if they know about gambling.
The urge to gamble more is so strong for some people that even if they had earlier decided some limits for themselves, they don't follow them and gamble out of those limits and eventually lose more money than they could afford to lose.
The only way to fight this is to stay away from gambling as much as possible, maybe try to get into some other activity, etc.