I too had ex with gambling issues. I only found out when I left though there was tell tale signs. He still gambles. There was other addictive behaviours in there.
I have met others since then with gambling issues. It’s difficult behaviour and accounts for a lot of things after I left. He was still gambling last I saw.
Ultimately those gambling issues account from money out of budget. I certainly knew something was up there.
Sorry you had to experience this as well. They appear to keep going and going.