If Wi-Fi connection you are using is unstable, it may be changed to cellular data to transfer files, so please turn on the option 'Only when connected to Wi-Fi'.
Go to the top left menu(3 lines icon) > Settings > File transfer and then set 'Only when connected to Wi-Fi' to On.