If you edit the code of a theme or plugin, regardless of method, it will be over-written by the next update to that theme or plugin.
That’s the case whether you use FTP or use Dashboard > Appearance > Editor or use the File Manager in the hosting control panel.
Which is why you should always create a child theme and edit that, not the original theme, as per Denzel’s advice.
I don’t know what you mean by an “integrated editor” because neither plugins nor themes come with their way to edit their code.
Perhaps you are referring to the Dashboard > Appearance > Customize options. In which case, using this DOES NOT actually edit files. And those changes do not get wiped out when you upgrade plugins/themes, because those options are stored in the database.