When you publish an application to the Alteryx Gallery it packages this workflow up into a yxzp and creates folders called 'Externals'. In these folders it might contain macros within your workflow or more commonly input and output file locations.
The Designer does this is to ensure your application has the read and write capabilities when published to the server. However, you may be confident that the server has access to a mapped drive or database. Therefore, you can do the following to keep your macros, input & output file paths absolute (C:\Users\etc.) rather than relative (.\etc):
1. Within the Alteryx Designer go to File>>Save As>>Gallery
2. Before Saving go to 'Workflow Options' >>> 'Manage workflow assets'
3. Make sure all macros, input and output files you want to keep absolute are unchecked
4. When you publish to the Alteryx Gallery now these macros, input and output file will keep the same path and not kept in external folders.
Consideration: When uploading to the Gallery the location of the macros needs to be accessible from the server. Hence, it is best practice to have these on a mapped drive or on the server itself so the workflow does not error.