Mosaic mode optimisation can be unstable, so you need to make sure there is a good spread of control points. Also it helps to optimise in stages, starting with a few parameters, and adding more at each step, the last step is to optimise all the necessary parameters at the same time.
Assuming your photos are directly facing the painting at a similar distance; you should start by optimising X and Y for all photos, except an anchor, to get approximate positions correct.
Then you can add r (roll) and Z parameters to get a better fit.
Then there are parameters that should be optimised for all photos, including the anchor, these are p (pitch), y (yaw) and b (barrel distortion).
Hopefully you should now have a stable mosaic. Add more control points to get a better fit if necessary. You can also add horizontal/vertical control points to straighten the output, but remember to add r (roll) optimisation to the anchor photo if you do.
--
Bruno