When I use the gamemode switcher (F3+F4) and then release the F3 key, the freecam also switches on/off. I'm not sure whether F4 is the default key for toggling Freecam, but at least with my configuration this happens.
I don't think that this is intended behavior, and it should be possible to fix.