Reshaping is sometimes recommended as a universal cure, but sourdough does not always recover well from it.
If the loaf is only slightly overproofed and still holds its form, reshaping usually causes more harm than good. It removes gas, damages the existing structure, and creates the need for another final proof. Baking immediately is the safer choice.
Reshaping may be possible when the dough has clearly overproofed at room temperature but still feels elastic and cohesive. In that case, gently press out only the largest gas pockets, form the dough again, and give it a much shorter second proof.
This works best with strong white-flour dough that has not become sticky or fragile. It is less successful with very wet dough, whole-grain dough, or dough that has been fermenting for so long that the gluten has begun to break down.
If the dough tears, smears across the worktop, or cannot create surface tension, stop trying to reshape it. Move to a supported baking method instead.