Hello Sandeep Naik - MSV,
Welcome to the MS Q&A platform.
When deploying ADF pipelines using the github actions, linked services can get overwritten based on the name in your ARM template.
To avoid overwriting linked services, you can parameterize the linked services in your ARMTemplateforFactory.json file and then use the parameters in your yml file.
For example, once you parameterize the linked services, you can pass them on the additional parameters section in the YML file.
Please see the below techcommunity article which has the main.yml file.
I hope this helps. Please let me know if you have any further questions.