Same problem but a temporary solution is to press F2 (Disable AntiCheats) function to deactivate cheat before the game ends or you win, then the game won't crash. That worked for me. Or just Quit/Close the trainer before you win the scenario, your 9999 of every resource should last some time so dont worry and the pop. should stay at 999 after loading or after closing trainer, so no problem there.. i hopev4.2 is working great with steam's latest version of AoE II...unlike the previous version.
however, when the game finishes, just prior to showing the scores, the game crashes.