Not true. All ambassadors are political appointees who must be confirmed by the Senate. Career foreign service officers who become ambassadors must take a leave of absence from the foreign service. There are various administrative things that are done for pension and other purposes.
All ambassadors must submit their resignations when a new President is sworn in. All agencies at post work for and report to the Ambassador save operational military commanders. The Ambassador is the President's "personal representative" to the host government.
https://www.voanews.com/usa/diplomats-its-common-politically-appointed-ambassadors-resign
... State Department spokesman John Kirby said Friday, and he confirmed that ambassadors who are career members of the U.S. Foreign Service about 70 percent of the top American envoys abroad were not asked to offer their resignations...