Ah, I don't remember exactly, but I would guess maybe six months. I set a deadline in January 2019 to start posting Reclaim in July 2019, and in that time I had to do all the things you mentioned, but also reworking the script at the same time + get another round of script feedback and tweak from that.
But I didn't work solely on my references and my planning during that time! I phased it out, I probably worked on school projects and drew other personal stuff as well. I don't really like to draw turnarounds and make super thought-out concepts for environments and stuff, so I prioritized the places and characters that would show up most commonly in the comic.
(You can see that in chapter 1, which actually... isn't a location with a lot of future scenes in it, so I didn't design it as thouroughly as I should have. and now I think chapter 1 has pretty subpar backgrounds...
)
As for how to not lose passion/motivation. A LOT comes down to practice. That's why people say you should start with smaller projects, and not your big magnum opus that's going to take 10 years to finish. Every time you DO manage to complete a project, you grow more confident, more capable to see things through to the end, and more experienced in your own creation process. I think passion fading over time is very normal, but you can teach yourself how to keep working even when you're not burning that the same passion that you had when you first fell in love with your project idea.
How long are you planning to work on the comic itself? If three months of preproduction is too long, how does that compare to the rest of your expected work time? Will you complete your comic in another three months? In a year? Several years into the future? How will your keep your motivation up for that time? It's not impossible! But it's important to think of your limits and if your scope matches what you're realistically able to do.
Finally, don't feel like you need to be 100% done with planning before starting your comic. I have characters that haven't shown up yet, and so I haven't made their reference sheets yet. It would have been a waste of time, because I'm a better artist now than I was in 2019, and so I will be able to make better design choices (and references) for them now when they're about to show up, than I would have been back then. Same with future locations and other stuff.