I'm trying different to find the best way to limit the current.
This circuit is by far the most close to the thing to what i want, but there is a problem.

As you can see in the circuit, the transimpedance amplifier's(X1) output is firstly inverted(or buffered depending on the current flowing direction) and then feed to two comparators(X3, X4) which drive the MOSFETs, comparing the inverted(buffered) transimpedance amplifier's output with a reference voltage.

As you can see in the plot, the load's current(red line) is limited as expected at 5 nA (that's because 2.5V across the 500MOhm generates a 5nA current, which is converted in 5V by the transimpedance amplifier).
As you can see though, the output voltage(green line) is also limited to 2.5V even if the input voltage(blue line) rises to 10V. I don't expect this since there is an opamp that should maintain the voltage equal to the input due to feedback. I really need that the voltage rises even if the current is limited.
Can you help me understand why this happens? Is this current limiting circuit bad designed? If yes, can you suggest me how can i improve it?
I know about the Ohm's law. But what i want to design is aimed to recreate an usual experiment that scientist do in paper about memristors. They limit the current to prevent the memristor damage, but they increase the electric field, i.e the voltage, on the device. That's is why i'm trying to force the Ohm's law.

That is one of the classic memristor characteristic. They limit the current to prevent device damages.