This likely caused, because switching mode is done through recreation of the window, so you'll end up with a new window handle and the event will likely be sent to the old one. I guess you could try and hold the key until the new window is ready an see if it then triggers correctly.
If you're tracking key states, you may want to reset the states once you recreate the window, since you might have also missed other events.
I don't know the specific APIs (yet), but the plan is, if the API allows it, to allow switching between windowed and fullscreen without recreating the window.