Please read How to create a Minimal, Reproducible Example carefully, and make sure you understand in detail both the advice being given and the rationale for it. Please also read How much research effort is expected of Stack Overflow users? for background.
Still, I don't get why people would need the files itself. As indicated, the problem is not the content of these files, but why the code I shared did not link to my files.
Well, there's the operative question. Do you need the files themselves in order to reproduce the problem? If you replace them with blank files, or with dummies that do something trivial (like, I don't know, console.log('Test that this code was run')
or something), can you still demonstrate the problem that way?
What else is required to demonstrate the problem? You seem to be claiming that you are using ASP.NET and SharePoint. What exactly does that entail? Do you have the same issue if you don't use those things, and instead just serve a plain HTML file referring to those JavaScript files, in as basic of a way as possible?
For that matter, what actually is your server configuration? What aspects of that configuration seem to be relevant to causing the problem? Did you try to figure this out, for example, by changing the configuration?
Aside from that, did anything else unexpected actually happen? For example, do you see error messages anywhere?
In the question:
For the aspx, though, it is as if when it opens for the first time, it copies both code and keeps it as reference.
Are you familiar with the term caching? Does it seem to describe the behaviour you are seeing? If so, did you try using a search engine to try to find reports of similar problems? If not, what terms did you try using in a search engine to look up the problem? Aside from that: specifically what happened in your testing, that gives you this particular "as if" impression? You should be able to show a concrete example where the output is X is the code behaves as you expect it to, but the output is Y instead; only then give your mental model as to where the erroneous Y output could be coming from.