If you also updated Quixel Bridge, it may be worth removing it and seeing if that resolves the issue. There’s some weird issues with it right now. This doesn’t sound like the problem, but having just updated to 5.2, perhaps? More info on that one here: Can't create blank, c++ 5.2 project
If not that, have you tried surrounding the code in a
PRAGMA_DISABLE_OPTIMIZATION
PRAGMA_ENABLE_OPTIMIZATION
block?