After further investigation, I have absolutely no idea how to produce a workaround to this problem. Please share your input on this bug report I submitted on GitHub and hopefully YoYoGames will take it more seriously: https://github.com/YoYoGames/GameMaker-Bugs/issues/6799