This is a tough situation to be in. What I have heard from recruiters (and the experiences of friends and relatives has confirmed this) is that in the IT world any employment gap of longer than two months in your resume will cause prospective employers to shuffle you to the back of the pile. A six month gap sends you straight to the "round file". I've heard there are only two exceptions, the road trip ("I decided to take a year off to travel in France") and caring for a sick relative. However, the good excuse doesn't help if you are automatically round-filed.
My husband fell into this pit a few years ago. He had worked as an electrical engineer for the same company for 15 years and when the company divested itself of its American offices he found himself laid off with a six month severance. So he spent six months (ignoring my dire predictions) messing around with his inventions and when he finally got back into the job market he spent four months with almost no responses to his resumes. He finally had an old colleague put in a good word for him at a company and once he got back into the job-stream he was fine, but it was a rough time for us.
I had my own brush with it back in the early 2000's, when I was around 40. I had been primarily a DOS based programmer and the world was moving to Windows based and Visual Studio, so I took a job doing VB6 for a few years. When that company went under I found myself "virtually unemployable" according to the recruiters. Prospective employers would look at my resume, see "VB6" and say "oh, she's not a real programmer" (ignoring the fact that I had been doing C for ten years prior) and toss out my resume.
Here's how I got back on track. I went back to school for a term. I took all the advanced classes (taking SQL III as your first introduction to the technology isn't something I'd recommend to the faint hearted. I figured, hey, it's not a real language, how hard could it be... :) I sucked every ounce of juice that I could out of the classes, doing all the assignments and extra credit even if I already had the "A", I wasn't doing it for the grades...
Then, I started my own business. I wrote an app to keep track of immunizations for my daughter's day care. I created an HTML page for my church. I created a web based questionnaire for my sister-in-law's company. I had a DBA and a public facing web page and business cards and everything :)
I didn't get paid for any of it, at least, not much, but I did the work and it looked good on a resume. That finally landed me a job with Intel, and my career has been on track ever since. I don't let any moss grow beneath my feet when I find myself on the job market.
Things don't always work out. I have a friend (also in his forties at the time) who had to quit his IT job to care for his wife who was seriously ill. She recovered enough to go back to work after a couple of years, but his career never did. He has been going to job fairs and studying tutorials and haunting recruiters' doorsteps for years. I think he's just given up by now and prospective employers can sense that.
BTW, I have tried going the junior role route but companies don't want to hire old people for junior roles. The reason has little to do with skill-sets, and more to do with the fact that in IT you need to be, as they put it in interviews, "excited by new technologies". Older people seldom are, and those that are seldom have gaps in their resumes.
I'd recommend that you start by talking to recruiters about what technologies are "hot" right now. Looking through Linked-in and Glass Door job requirements will also tell you a lot. Take the top five which are hot now (that will all change by next year so study fast) and go through the tutorials. I'd recommend either Linked-in (https://www.linkedin.com/learning/me) or Pluralsight (https://app.pluralsight.com/). Their tutorials are extremely well organized, and the purpose is to bring a newbie to the technology up to speed, which is what you want.
Good luck. You'll need it, I'm afraid. If you've only been in this profession for 12 years and you already have multiple breaks of "1 year to 6 months" you are going to have a hard time selling yourself to an IT hiring person. The expectation is that you live and breathe IT, that you code in your sleep (no kidding, I actually had someone ask me on a job interview if I ever found myself coding in my dreams). The big gaps will be hard to explain.