It is a chronic problem of writers: you plod along on your story, dull dull drab dull dull dry, wrenching out the words and sentences -- and another story idea dances about and teases you with how bright and sparkling it is.
If you jump to the new idea, it in turn grows dull dull drab dull dull dry, and yet another idea hops up. Until you have chased dozens of ideas farther and farther into the deep dark forest, ever more distant from the Castle Completion.
This is the perfect way to never ever finish a story. And if the first rule of writing per Robert Heinlein is wisely "You must write," the second rule is equally wisely "You must finish what you write."
A minor piece of advice first. If you have fallen into this habit, the first thing to do is to take your half-finished stories and re-read them all. At worst, you lose an afternoon that way. At best -- well, sometimes something leaps out of the manuscripts where you lost interest.
One thing that may pop out is that you began too soon. Not in the story, but in the process. You did not have a story idea, but a setting idea, a scene idea, a character idea -- which naturally petered out because it could not sustain a story. I find writing outlines helps with this -- petered out outlines are less depressing -- but other writers don't. (There are various ways to flesh out your story, and other writers may offer more helpful ones if your ways don't match mine.)
If neither of those are involved, there is nothing for it but to cultivate the habit of not going on to new ideas, if only by circling back.
Try sticking to one story as long as possible. Try writing on a work that seems dead because often inspiration comes after you start writing. But if it really doesn't move, or you know there's a problem you can't fix at the moment, switch stories -- back to one you worked on before if at all possible.
This is still slower than concentrating on one work, and it carries the grave peril of forgetting vital things in the gap, but it can also refresh your inspiration.
On one hand, take notes of things you plan but have yet to get to.
On the other hand, the inspiration may consist of forgetting something you had intended and sending the story roaring off in a fresh, new direction. (Reading for revision may discover that the discrepancies are large and hard to fix, alas. But at least you got that far.)
One other advantage of the technique is to prevent dead times in your writing.
When you have written something, or given it a pass for revision, it is wiser, generally, to lay the completed draft aside for a time. (This enables you to read what you wrote, not what you thought you wrote. At least somewhat.)
If another project is in progress, you can switch off with minor adjustments. Indeed, filling your thoughts with another project can help you come back to your old project with clearer eyes.
This smooth switch is even more of an advantage when you kick one project out the door to publication. The jolt can be bad. Keeping the habit going can help smooth it out.
Still, there are things to watch against. One is trying to work on two stories can that be confused. A story with a heroine named Isobel and another one with a heroine named Isabella may have real problems -- or whatever other commonality confuses them for you. It's advisable to stop one whenever you can't keep them straight.
More important is to keep switching back. Even if you think that a story is still dead to you, try it before you switch to a new one.
And if you do pile up half-finished stories, revert to the advice I gave at the beginning, and re-read them all in a rush. Even if something leapt out one time you tried that, something else may do it this time.
Because this is a never-ending process.