Bug cropping up only in Steam build

Hi, so I recently put the Windows version of my game demo up on Steam and have been playtesting it. Things seem to run fine for the most part, but at the end of the demo, when the player is supposed to be sent back to the title screen, the game suddenly throws an error. I haven't been able to recreate the error in the RMMV engine or even after deployment. It's only once I play it on Steam that I get this error:
1770460449246.png

and here is the event page where the error is occurring (specifically it's the script that causes it):
1770460519699.png


I'm using a custom title screen via the HimeWorks Pre Title Events plugin which is why I can't simply use the default Return to Title Screen command (because it always throws an error).

Edit: after finding this workaround, I was able to get Return to Title Screen to work. Unfortunately that still didn't solve the problem and I still get the error... 🙁

I'm really at a loss as to what the issue is even after recreating it several times on the Steam build. At one point I thought I fixed the bug when I loaded an old save after updating the game and it worked properly, but I ended up getting the error again on the next playthrough I did (after starting New Game).

Also for reference, my title screen is just a blank map with a parallax background and the following eventing for the options:

1770462229414.png


Any help would be greatly appreciated!!

Original thread: https://forums.rpgmakerweb.com/threads/bug-cropping-up-only-in-steam-build.182324/