IMO, you don’t leave until after your side gig is proving that it deserves more of your time and attention as well as financially rewarding enough to warrant leaving your guaranteed paycheck (and future savings) behind.
I cut off cold turkey with a 15k stockpile to try my hand at freelancing and building my own software. Didn’t sell or make much and before I ran out of runway i had already been working towards finding an org that fit me personally.
There are definitely times and risks worth taking but I tend to lean towards proving that your side passion outside of work warrants a departure.
TBH, I did a lot of research and even some maintenance and development while technically at my job, either on breaks or merging my research efforts with what I was doing at work. Only when I had a suitable savings and showed that my side work was warranting more of my time did I decide it was time to devote another 40 each week to it.
And even after a year or so of trying, I eventually came back to work for an organization that offers a lot of what I like to do and the freedom that I enjoy.