For contractors, it's obviously somewhat different - but speaking from experience, many short contracts tend to get extended, so someone who has a raft of 1-2 month contracts and very few longer ones might be a bit of a risk. (Obviously some contracts are intentionally short - but I would definitely describe a very short contract on my CV as being more of a "project" than an actual contract.)
I have had my job eliminated, regardless of my personal job performance, a grand total of four times. I have been forced out via office politics once, and voluntarily left a job once.
If you had a family, would you want to work for someone who is probably going to sell or eliminate your job well before retirement?
The loyalty from employers is gone. If you don't want me to leave in a few months, offer me an actual contract, and one that binds you to the relationship as firmly as it binds me.
But more than anything: get comfortable talking about WHY it didn't work out, in a way that doesn't bad-mouth the company and still makes you look like a professional.
An advantage of applying through a recruiter is that they can have this chat with you first, and then make your case to the employer (who they will have a relationship with). As a Hiring Manager, I've said no to candidates, only to have a recruiter persuade me (rightly) that actually I should talk to them, even though there were things that spooked me about their CV.
If you had a business, would you want to hire someone who is probably going to jump to another job in a few months?