It seems that Great Britain was very near defeat during World War II. If their colonies did not try to separate or leave the empire, why not?
Edit: sorry for the bad grammar.
Well, they -did- separate and leave the empire, they just did so -after- the war. South Africa (which was de facto independent) was actually on the fence about joining the fight, with some of their legislature supporting the Nazis' open racism. Canada and Australia were both already virtually independent and separate countries (dominions are weird). The nascent Irish Republic was neutral due to its lingering resentment of the British. The biggest example of outside agitation was probably Japanese support for Subhas Chandras Bose and the Indian National Army, which technically controlled and/or operated out of the meager portion of India that the Japanese occupied. Bose died during the war in a plane crash, so not much came of -his- vision of India, which would go on to gain independence under Jawaharlal Nehru and Gandhi. In the Middle East, Britain re-occupied their former mandate of Iraq to prevent it from formally aligning with the Axis, and then jointly occupied Iran with the Soviets. So it was definitely a problem, but it was also one that the British moved very quickly to deal with before it became a threat.
I only know about most countries in generalities, but I'd like to talk about Burma specifically.
The Burmans (that's the ethnic group that lives in lowland Burma, and the largest) were generally anti-British. Firstly, they didn't like the way that many parts of the civil service and many businesses were run by Indians. Secondly, as devout Buddhists, they were not keen on the fact that their rulers were not Buddhists. Thirdly, they were the most taxed part of Burma. Contrast this with the hill people, who were the targets of concentrated missionary activity, which eventually led them to be rather pro-British generally ("they brought us medicine and Jesus"), combined with the fact that they thought the British protected them from their traditional domination by Burman kingdoms, and the fact they generally paid little tax.
So, many Burmans wanted independence from Britain, as did many other ethnic groups, especially in the lowlands. The Japanese trained an elite squad of exiled Burmese independence fighters in military techniques, sabotage, propaganda, etc. The first squad was called the Thirty Comrades. Their leader was a Communist and Nationalist called Aung San (father of the famous Aung San Suu Kyi). He led the Burmese fighters back to Burma to fight the British in a war of independence, fighting British forces and loyalists (largely Hill Tribes and Indians).
However... Japan invaded Burma. They promised Aung San that after the war, Burma would be independent, but with their own Imperial project, their simultaneous conquests in French Indo-China, and their atrocities against Burmese civilians ("The British may suck our blood, but the Japanese grind our bones!"), Aung San eventually decided that he just couldn't trust them. He also began to suspect that they might lose the war anyway.
So, he went back to the British, and offered to switch sides and fight with the British against the Japanese, if they promised that Burma would be independent after the war. He believed the British were more likely to stick to their word if they won than the Japanese. The British accepted, the Burmese independence fighters switched sides, and fought with the British (and by this time, the Chinese, who were invading Burma from the North, fighting alongside the pro-British forces to force out the Japanese: the Chinese, as fellow victims of Empire, were much more popular than either the British or Japanese, amongst Burmans, not to mention that many Chinese were Buddhists and Yunnan shares many ethnic groups with northern Burma's hills).
After the war, the British kept their word, and Aung San travelled to London where he and new PM Clement Attlee signed the independence agreement (after Attlee quashed a legal trial prosecuting Aung San for atrocities against pro-British ethnic minorities, so that it wouldn't disrupt the peace agreement).
Unfortunately, not long after, the now provisional-President Aung San was assassinated by ambitious nationalist ex-Prime Minister U Saw, shortly before the independence agreement actually went through. This was followed by a period of chaos, followed by a Socialist Dictatorship, followed by a Military Dictatorship, up to the present day.