No, it is not necessary to be connected to the camera's wifi the whole time of recording. Make sure to be connected when starting and when finishing the recording. Once the recording has started, you're free to disconnect and use other wifi or internet connection until you want to finish the recording.

Read more information on how to start recording here: Start recording.
And more information on how to finish recording here: Finishing and saving your recording.

Did this answer your question?