France:Britain as Vietnam:India
Remember that it was due to india largely that Britain pulled itself up from being a poor, dirty, gin-filled outlier in the early 1700s to the richest state in Europe in the early 1800s. The industrial revolution and a captive supplier (Indian mines, cotton farms, farms etc had to sell to England only) and captive market (India had to buy from England only) made London rich
Vietnam was nowhere near as pivotal to the French.
Algeria comes close to the pivotal nature
The French lost badly tot he Japanese and then after WWII, instead of starting the process for Vietnamese independence to Ho Chi Minh (who wasn't quite communist yet), they thought they could traipse back as lord colonizers.
Then they sucked in the USA
In contrast the British knew when to leave.