I can vouch for this advice. I had an encounter with a bad employer and a 6 month period without a job. I ended up taking a position somewhere that treated me like a freak for it and tried to use it to weaken negotiation. Additionally, they took issue to me not having many multi-year roles. Normally, I'd not tolerate that, but sometimes you just need health insurance (thanks, USA).
That place ended up being a terrible place to work for a number of reasons. I eventually found a much better team who didn't question any of that. It was an entirely freeing experience. It truthfully would have been a liability to stay there any longer as the leadership and technical skills were not there. I left alongside many other people and haven't looked back.