Chinese ruled themselves was not continuously. Ming Dynasty did it (1368–1644), and recently, in last century ROK (or KMT) regained Independence for China in 1911.
I think you have wrong information. The title Tĩnh Hải quân Tiết độ sứ was rejected when Ngo Quyen Claimed himself as King.
By the year 938 In 938, Southern Han sent troops to conquer autonomous Giao Châu. Ngô Quyền, Dương Đình Nghệ's son-in-law, defeated the Southern Han fleet at the Battle of Bạch Đằng River (938).
He then proclaimed himself King Ngô and effectively began the age of independence for Vietnam.
Ngô Quyền's untimely death after a short reign resulted in a power struggle for the throne, the country's first major civil war, the upheaval of Twelfth Warlords (Loạn Thập Nhị Sứ Quân).
The war lasted from 944 to 968 when the clan led by Đinh Bộ Lĩnh defeated the other warlords, unifying the country. Bộ Lĩnh founded the Đinh Dynasty and proclaimed himself Đinh Tiên Hoàng (Đinh the First Emperor) and renamed the country from Tĩnh Hải quân to Đại Cồ Việt (literally "Great Viet Land"), with its capital in Hoa Lư (modern day Ninh Bình Province). Emperor Đinh Tiên Hoàng introduced strict penal codes to prevent chaos from happening again.
History of Vietnam - Wikipedia, the free encyclopedia