`size()` is meant to be the linear size (what you call `n`, for an `n x n` linear operator). It's been a while since I looked at that function, but it appears that the `size()` function is only used to set the maximum number of iterations, as you can see here:

https://github.com/ITensor/ITensor/blob/v3/itensor/iterativesolvers.h#L537
It is possible that for some problems it is having trouble converging, and for some reason requires more than `size()` iterations. I would think at least theoretically that shouldn't be the case, since once you reach `n` Krylov vectors then the entire space is determined, but perhaps there are some orthogonality issues that are showing up that are degrading the accuracy when using such a large Krylov space.

Instead of changing the definition of `size()`, I would instead try playing around with the arguments "MaxIter", "ErrGoal", and "RestartIter". Generally for iterative solvers I would recommend setting "MaxIter" to something quite large, and then adjust "ErrGoal" based on the accuracy you need for your particular application. "RestartIter" sets the number of iterations before the Krylov space is restarted, which can help if your "ErrGoal" is not reached in a relatively small number of iterations and orthogonality issues show up. So an example might be, for a problem of size 100 x 100, to use something like:

gmres(A, b, x, {"MaxIter=", 200, "ErrGoal=", 1E-10, "RestartIter=", 30)

where of course you should adjust the specific numbers based on your application (perhaps try setting `"MaxIter=", 2*n` for a problem of size `n`, for example).