Heating the middle has to be a pain. And cutting it…
Well if you insert metal rods through it you can help with the heat transfer, then you can lattice over the holes. If you pumpkin pie it, you might even be able to have it hold up under its own weight. Plus a bit of stiff whipped cream in the holes would help.
One could always precook the filling.
I’m pretty sure that the state of the art right now is firing the pastries on a ballistic arc in hard vacuum and hitting them mid-trajectory with a laser pulse to cook them through.