The error I had came even though the data was not referenced.
The data was being copied to the server, I suppose the Managed ArcGIS DataStore of the Hosting Server.
This was the error:
WARNING 086223: Jobs directory in service definition is not set or is invalid. Using default jobs directory.
Creating the service.
ERROR 001487: Failed to update the published service with the server-side data location. Please see the server's log for more details.
ERROR 001369: Failed to create the service.
Failed to execute (Publish Service Definition).
This was due to some parameters in my Modelbuilder model that were set as Constant values in the result of the geoprocessing history, and shared as a web tool.
When you right-click the model>edit metadata, the item description page appears.
In there, there is a section where you can specify the syntax of the model parameters by providing a dialog explanation for them.
I was providing a dialog explanation for the 'output_gdb' (a workspace variable), the 'excel_csv_output' (a folder variable), and 'analysis data' (a folder variable).
My theory is that by doing this, it was forcing the staged web tool to try to copy these workspace and folders to the datastore, but the directory structure was not available in the datastore.
The web tool would maybe then no longer use the default workspaces and folders in the datastore.
I was able to publish successfully once I removed the dialog description for these workspaces and folders.