When you lose interest in a story that you’re writing but YOU HAVEN’T LOST INTEREST IN THE STORY, YOU’VE JUST LOST INTEREST IN THAT PARTICULAR PART THAT YOU’RE WRITING AND YOU WANT TO GET TO THE GOOD STUFF THAT YOU’RE ACTUALLY INTERESTED IN BUT YOU CAN’T DO THAT WITHOUT FINISHING THE BORING PARTS
look, you know what you should do about that?
WRITE THOSE PARTS. Ignore the part that won’t come out, write the other stuff. Maybe the middle part will cooperate after that. Maybe it won’t and you can just timeskip somehow.
Having the last part of a thing done is better than having no part of the thing.