I do that. Usually, I have a skeleton of my story, like, a real real beginning, middle, and end, skeleton.
I have my prologue written, which is usually how I see the story ending, so I know what my ultimate goal is. Then I write normally, and sometimes, I want to write a certain scene, or I get inspiration for a piece that wouldn’t fit the place where I’m currently at, so I’d write that out.
More often than not, though, my story goes in a way different direction than I had planned, but I go with it. I don’t write the story, the story writes itself (if that makes sense )
But, yes, I do write out of order, and sometimes I feel that’s the best thing ever. Because when you’re stuck and don’t know what to write anymore, just detach yourself from the place you’re at and let your characters speak to you. That’s how I also sometimes get out of writer’s block, I just put my character’s in a different situation.
Sometimes even just fluff helps to get out of writer’s block. I’d write little scenes that aren’t important to the story, like a date, or a little family dinner, but that would get the juices flowing again and I can start writing again.