When you start file sharing, transfer files or other long time tasks, they will be interrupted after you leave the app or lock your devices. There is a technique to keep these long tasks run in background until they are finished.
To keep FSharing run in background, you can play any music and turn on loop forever in the music player within the app. As long as the music is playing, the app is still running in background even you leave it or lock your devices.