Why does what i mentioned work in WinSCP but not on Filezilla?
It does not really work, it just appears to work, on the surface. Under the hood, WinSCP gambles with your data, as it makes a guess, a shot into the dark, by when the editor must have been done saving the file, in order to upload it. This may work in most cases, but eventually, there will be one where its guess is incorrect. It will then upload a corrupted, partial file. Additionally, the editor will probably throw a tantrum, too, as it cannot really finish saving the file that is opened for upload. As a result, both the local and remote copy will be corrupt, resulting in data loss. FileZilla simply doesn't want to go that route.
You can right click any remote file in FileZilla and select "View/Edit". This will download a temporary local copy of the file and open it with your configured editor of choice. The local copy is necessary as FTP files cannot be opened directly on the server. Even WinSCP will work with a local copy, under the hood.
When you save in the editor, FileZilla will sense that the file changed (but it can NOT tell if the saving process is complete, that's the whole issue). For that reason, it will pop a dialog and ask you to confirm that the local file has been saved correctly and completely. Only after your confirmation, the file will be uploaded back to the server.
The local copy stays and you can continue editing it. But each further save still has to be confirmed, again.
The editing process can be ended by unediting the file. The dialog for that is in the File menu (or CTRL+E). Unediting deletes the local copy. Alternatively, you can quickly unediting all edited files when you close FileZilla (it will ask for confirmation).