You are right. If a person takes a break from gambling it usually gives the person the time to learn about their past mistakes. Whey the decide to to return, they would have come back with a stronger mindset and also proper money management and discipline. With tyoe of experience they have had before they won't try to repeat the same errors that caused them losses before.
Not completely because if they are used to it, they will repeat it exactly the same with the familiar pattern stored in their memory when they play unless they go out specifically to practice eliminating the habit and start trying to apply money management and discipline over a long period of time. But if it is only a month or a few months later, playing again is certain to not be much different, the results will definitely repeat the same mistakes.
What specific method is used to break this habit? I don't think there is one. It's not a specific method, but rather, they have to redirect their gambling feelings or thoughts to something else. There's no specific method, but rather their own method. I think a specific method applies to everyone, and everyone should try it, while the individual method is more individual, whether it's reading, exercising, or something else.
When someone is trying to quit gambling, or has a previous addiction, and they're still in the process of getting clean, and then they have thoughts of gambling again even though they're not completely clean, it's possible that the mistakes they made before could be repeated, and it will be even more difficult to stop gambling, unless they've truly gotten clean, meaning they no longer think about gambling as a means of making money, for example.