On undo, DAW is sometimes accurate and sometimes returns 1.0, instead

I am setting a parameter value with setValueNotifyingHost. When I undo with CTRL-Z, it sets the value back to the previous one correctly, but when I redo, it sends the value 1.0, consistently.

I’m using FL Studio, and when I click on the undo history, it always sends 1.0, so both when I choose redo and when I click on the undo history, the DAW sends the plugin 1.0, but when I hit CTRL-Z, the DAW correctly sends the previous value.

What could be causing this? Is there something I should look into?