How applications like MS Teams update

We had a teams issue today morning and it was fixed within a few of hours. One thing I noticed is that the bug in the application (MS Teams) was fixed while it was running. Some of us had to restart but for most of us did not need a restart.

My question is, how does something like that happen? For example, in Windows Forms/WPF application, my understanding is you cannot change the program files (the exe and etc) while it is running without restarting the application and running some sort of a helper application to do the file swapping. I know that MS Teams has not been built using .NET technology stack, but I’m just curious how they work around the issue and when the updates are actually applied.

I am not really familiar with electron and this could be normal for an electron app built using JavaScript. Does anyone have an explanation?

Source: Windows Questions