UPDATE: The problem was that the loading screen wasn't rendering at all because I put it in the wrong place in the HTML file (I put it under the div with ShowAdminPanel, instead of beside it). I haven't got enough sleep for weeks. I'm marking this solved now, thank you so much for those who took the time to respond, despite this post being such a mess. I really appreciate it.