@djm_ You could perhaps use build plugins for this. You could (re)move that file programatically before the build starts via the onPreBuild event.
Plugins are really handy for extending into the Netlify Build tooling.
https://docs.netlify.com/configure-builds/build-plugins/create-plugins/