It totally depends. In my own career, I’ve worked at quite a lot of studios, but haven’t had to move to a different city since moving to the UK, because there are loads of studios in London. In the US, if you live in LA and you’re good, there are quite a lot of studios there to work for. Same in San Fransisco. Texture painters aren’t as common as modellers, animators and some other roles, so it’s perhaps a little easier to stick to one shop for longer. Yes, contracts tend to be project-based, but if the studio has more jobs lined up, they’ll keep you, simply renewing your contracts. I have friends at places like ILM who have been there for yeeeaaaars.
I also have lots of friends and colleagues in VFX who have kids, and they manage just fine. Even if you end up having a gap between contracts, VFX pays pretty well, especially once you get to senior level like myself, so you can pad your savings account while you’re working in case you have a dry patch. I’ve been on a long break myself but am living on savings because I’ve always been prepared for breaks in case they happen. I could probably go find work in a small studio, but I prefer only working for the bigger places (not because I’m a snob, but because smaller studios tend to involve longer working hours and I don’t do that), so I can afford to bide my time until something else comes along. That’s how it works, really. This, incidentally, is the first time in my entire 13 year career in VFX that I’ve been in a long dry spell - I’ve always previously been able to jump from studio to studio without gaps.