Change option for NewtonSolver when solver doesn't converge

I would recommend writing your own newton/nonlinear solver. You can look at the corresponding tutorial for dolfinx or this example for dolfin for an inspiration.