The solution speed is very slow

Avoid calling solve F==0 inside the loop, as it recreate a lot of structures (sparse matrices, vector for thr RHS, ksp solver etc.

This is covered in various other posts on the forum. In the context of DOLFINx at:

and for legacy dolfin and linear problems in

You are not customizing your solver. See for instance:

You can write a custom newton solver, see for instance Set krylov linear solver paramters in newton solver - #3 by nate