The state change is done asynchronously on purpose. If we're not tracking WM state changes correctly we should debug and fix that.
Restoring the synchronous processing is not really going to fix the issue, but rather hide it because it will discard the pending events by forcing the win32 state to change earlier.