This happened to many times when I already have huge profit such as x2 to x5 of my bankroll. I usually hangout out for more gambling but place only small bet on slot games. This small bet turns into increasing bet when losing badly u til I already buying bonus that keep losing too until I bust all my bankroll.
Gladly, I overcome already this weakness through securing immediately my profit by withdrawing it and convert to fiat via exchange P2P to avoid gambling again for more win.
This isn't rocket science but more of a conservative strategy who are more keen on not to lose money in the name of gambling so whenever you make some money then withdraw your deposit and everything that's left can be used with more freedom cause you are not going to lose anything from your pocket even if you bust the remaining bankroll.
Everyone can practice it and as OP said he learnt this in a hard way but for newbies just be smart and learn from others mistakes.