I have also tried a different solution, that is: instead of replacing u_ref, I adapted the MPC so that its optimization variable is delta_u instead of u. I guess that in the unconstrained case I shouldn't need to do other modifications.
However, this solution does not work neither.