I don’t suppose building with --debug=bootloader makes any difference?
The only code difference between console and windowed modes on Windows beyond the compiler flag that tells Windows not to spawn a console is the exception handling (redirecting errors to a popup dialog so that they’re not invisible) which doesn’t kick in until application shutdown so no, it shouldn’t make a difference. On the other hand, windowed mode is the one used most often by malware distributors so it’s not that unlikely that the slowdown is just MS defender scrutinising the application more thoroughly.