If a node has not announced a tx at all, then it should respond to getdata messages for that tx with notfound, to avoid leaking tx origination privacy.
In the future this could be adjusted such that a node responds with notfound when a tx has not been announced to us, but that seems to be a more involved change. See e.g. https://github.com/jnewbery/bitcoin/commits/pr14220.1