I really do not know, i think it overrides the assembly as i reuse namespace and object name, but i'm not sure.
I tried to observe memory usage of Vintage Story process, but it didnt really raised when i relaunched mod like 30 times, but to be fair the mod just creates pop-up, so its not very heavy.
From what i read you can unload assembly, but only via unloading whole AppDomain. I tried to make it work, but i wasnt really going anywhere as you need to first create full new Appdomain and its need all dependencies from library, so vsapi.dll and passing objects isnt straight as its here. In this solution i just pass existing game's api object and it works
But even if it doesnt unload dll correctly and it stays in memory, but its not used, its not really a problem in the end as this is debugging solution, so production solution
----edit----
Ok, i checked loaded assembly in the current AppDomain and loaded mods are added on every button press:
https://i.imgur.com/t5vIEZU.png