How secure are .patch?diff_id123 paths?

It is possible to add .patch to the diff URL and retrieve a raw patch file.
For example.

Merge request diff page: Draft: Add more GitLab CI/CD jobs metrics [RUN ALL RSPEC] [RUN AS-IF-FOSS] (!19517) · Merge requests · / GitLab · GitLab

Load a raw patch for Version 26 of the merge request:
Raw patch URL for the version, requires appending .patch along with ?diff_id=

In turn a previous version of the raw diff can be rerieved with

The question is, is it possible to alter the contents of the raw path at a particular version.
Considering scenarios like force pushing commit deletes to the underlying branch… deleting and recreating the branch etc. Can someone confirm or add insight into whether these paths are secure enough to use in a build pipeline?