I spent a couple of months shooting in Vietnam a few years back, and the WiFi situation varies wildly depending on where you land. The suggestions above about picking accommodation carefully are solid - I'd add that you really want to test the connection before committing to anything longer than a week.
For your 3-4 month stretch, I'd lean toward Ho Chi Minh City or Da Nang over Hanoi if stable work is the priority. HCMC has better overall infrastructure and more coworking options if you get tired of coffee shops, though it's noisier and pricier than some places. Da Nang splits the difference - quieter, still has decent spots to work, and the cost of living is genuinely low. Vietnam's a good call because the accommodation is cheap enough that you can afford somewhere with solid internet without breaking the bank. Cambodia's workable but infrastructure feels more hit-or-miss, especially outside Phnom Penh.
One thing worth considering: most people focus on one or two cities for the duration instead of bouncing around constantly. If you're working on actual deadlines, constant moving means constantly hunting for reliable WiFi. Pick your main base for 6-8 weeks, get comfortable with a few reliable spots, then maybe move to a second city for the rest if you want variety. The coworking spaces in both Vietnam cities are reasonably priced and you'll meet other remote workers, which helps if you're working solo. Just don't assume every cafe with decent coffee has internet that'll handle video calls.