I could think of merge strategies, e.g. ours. Lately I had seen that you can do that within .gitattributes for specific files in a persistent way. Though you need to do a deep dive into merge drivers, with first creating ours always returning true.
git config --global merge.ours.driver true
Then you can add a new file called .gitattributes (or modify an existing one), add and commit that then.
.gitlab-ci.yml merge=ours
This works with local merges, but also needs installment on the GitLab server, e.g. when a Merge Request should be merged.