My code is lost if after updating in manual mode

You switched Test Case editor from manual mode to script mode, right?

Yes, it is like that.

There are several previous posts about this strangeness. See

and this

If you want to use the script mode, you should stick to it. You should never switch to the manual mode.

If you want to use the manual mode, you should stick to it. You should never switch to the script mode.

You should not mix the manual mode and the script mode.

Switching from manual mode to script mode, your test case code will be re-generated by Katalon Studio, resulting in something you did not expect to see.