How can i resolve this issue?
Don't use this way of injecting code into generated files. When they are re-generated they might get overwritten.
There are some clearly marked placed where you may insert declarations or code. Only those areas will survive a re-buld.
There are two other ways to control the code flow for interrupt handlers:
Using the Component_StartEx() API (explained in the component's datasheet)
or using "macro callbacks" (explained in Creator Help)
I (personally) do not tamper one of the generated .c files (to be quite honest, I rarely do look into them at all). I prefer using StartEx() which allows me to delete from time to time all the generated files (keeping a workspace bundle quite small) and re-generate them at need.
You are always welcome!
Be creative ;-)