Initval is equivalent to endval but model is not generate constant graphs

in my model, I have simulated an increase in energy price shock.
I have initval and endval that the difference between is the price of energy in the name P_e.
my questions are:
1)if I set, for example, initval to 0.4 and endval to 1. variables have strange behavior. For example output from the first steady state goes to the second steady state, then it increases until gets another steady state. Please see in the code.
2)if I set for example initval to 0.4 and endval to 0.4,logically dynare must generate constant graphs but it generate strange graphs.
very very thank you.
I attach my dynare code.
simulation_nodebt.mod (12.4 KB)

You are not starting at an actual steady state. initval must be followed by a steady for that to happen. If you change this, you indeed obtain a straight line.
simulation_nodebt.mod (12.4 KB)