After several days of usage, Activity Monitor will usually shows that "WindowServer" is using 6 GB of RAM.

Yeah, 8 GB RAM does not cut it anymore. At least until Apple start fixing the memory leaks in MacOS.

Unused RAM is wasted RAM. If your machine isn't reporting memory pressure and/or the user isn't experiencing pageouts, then the machine is well-suited to the user's workload.

I'd rather my ram go to my page cache, not have bloated apps hoarding it.

But I thought Electron was the future?

Have you tried turning it off and on again?