Which one is your priority? Writing thesis or writing academic paper
There's no single right answer here. 

For instance, if your department allows you to submit a "stapler thesis" that consists of submitted and published manuscripts, then it makes all the sense in the world to write the papers and then submit them as your thesis. On the other hand, if you can't do a stapler thesis and have to submit your thesis in just a few months, there's no sense in pausing to write complete manuscripts.

Similarly, if you're relatively early on in your career, there's no sense in waiting for the PhD to publish (in fact, this would be a spectacularly bad idea, since you'd give other people time to publish ahead of you).

So, basically, you need to consider your relative progress in the PhD program, what is and isn't allowed in your thesis, and what the ramifications of not publishing immediately are before making that decision. Of course, you should also discuss this with your advisor, who may have some additional insight.