If you just leave it there it’s likely to overcook. Take it out when it’s done and enjoy.
Baking Bread with Lava in Iceland (actually with hot springs heated by lava)
There is this restaurant on a volcano on Lanzarote, in the “Parque Nacional de Timanfaya”, where they cook with the heat from the magma below. I am sure you could cook a pizza with that, as well.
There are places on the planet Mercury that, if you were to find a lava tube of sufficient depth, would be the perfect temperature for human habitation. Some of the craters on Mercury’s poles are never exposed to sunlight and actually have ice in them. Most of the planet is of course boiling hot when the Sun is overhead. But there should be some choice areas where you could skirt the balance of the two, and find lava tubes that, with proper sealing, would be quite comfortable for humans to occupy.
Between the fire and the ice, that is where you may find home.
It’s called a pizza oven!