Don’t assume an ordering on the parameters. Use the symbolic tooling as described in the docs. This page goes into some detail:
Effectively you want to:
prob = remake(prob, p=[p1 => p1, p2 => p2])
Then to optimize it more, use setu as described in the docs.