There is no "fly by" mode. Any screenshots you see that show the exterior of trains are done using 'Track Viewer' or 'Developer Mode' (depending on the version of BVE). In this mode it is not a train you are driving as they are utilities designed for use by developers when building/editing routes.
Activate Developer mode by right clicking in BVE 4.2 and click "Options", then in the tabs on top press "User" and click "Developer", then press "Ok". After that right click again and press Viewer mode/ctrl + m. Deactivate Num Lock, in the numpad (the one beside enter not ontop of the letters), press 8 and 2 for moving upwards and downwards, 4 and 6 for left and right and front arrow and back arrow for forward and backward. Well you can also drag with your mouse too.