Conditional rendering using @live_action and socket reconnect

I’m doing a push_patch inside liveview and rely on :if={@live_action == :xxx} to conditionally render additional element. However, during socket reconnect, I can see view going through mount and handle_params handlers, but that element is no longer rendered. The @live_action is still assigned and has a correct value. Why is that?