Do you mean when you are just in the 3D window?
There is no 'Fly' mode here.
Only when you go into the "Explore" mode can the fly mode be turned on and off with the 'F' key.
ESC will exit the explore mode and return you to the 3D window.
One of the forum moderators.
Versions 6.5 to 25
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Dell Precision 3510 - i7 6820HQ @ 2.70GHz, 16GB RAM, AMD FirePro W5130M, Windows 10