Short answer: Switch, Grounds, Batt connections, Door wires.
Longer explanation:
You can try replacing the switch...module. That might solve the problem long-term (hopefully) ...or maybe not. The module is a computer module (part of the switch assembly) which controls the windows locks and even security, and communicates to other modules (incl the BCM) on the bus network. When the module or electrical path ...it leads to the issues you described. You can disassemble the module and inspect the solder joints and even check the capacitor's ESR (electrolytic capacitors can dry out eventually) ..and even replace the capacitors, or re-do any cold solder joints. If you're into automotive electronics.
The problem you described has plagued H3 owners going all the way back to the beginning. There's a ton of old posts about it. And window module flake-out's happen on other cars too (non GM). Even after replacing the switch, and cleaning the battery grounds (and body grounds), that doesn't often solve the problem long-term for many owners. Just go back and read really old posts or do google searches. What I found on my H3 was the ground below the carpet (under the driver's feet), was badly rusted (from previous sunroof leaks). Since I cleaned that ground ...and trimmed back the corroded wire and a new connector ... I haven't had a single problem. That was 3 years ago.
My theory is that ground is closest to the driver's door/switch (module), and is critical for the electrical path to the BCM and other modules. There's also a ground under the passenger's feet too I would check. You should be able to gently lift off the plastic sill plate by the driver's door, lift up the carpet and peek in there with a flashlight to inspect. Bear in mind the ground wire at the connector could be corroded too. There must be 10 grounds inside the H3 cabin...they're all over ...if you ever have your interior removed.
Another thing to inspect are the wires in the door jamb (both doors). Loosen and pull back on the boot and check them for any which might have frayed, cracked or broken. On a Jetta I owned, out of 24 door wires, all but two had cracked wire jackets, and 3-4 wires were broken and frayed. It may not be your H3's issue, but it's worth the few minutes it takes to inspect ...if only to rule it out.
Good luck!