As trade frictions and other disputes fester between the United States and China, and as China itself becomes more authoritarian, more Americans have found themselves stuck in China and unable to leave. A Koch Industries executive was held in southern China and interrogated for days in June before being allowed to exit the country.

The State Department issued a travel advisory for China in January, warning Americans, particularly those with dual Chinese-American citizenship, that they may not be allowed to leave China if they go there.

A growing number of foreign companies, particularly American companies but also Canadian and European businesses, have responded by scrutinizing but not prohibiting travel to China by executives and employees.

The quick release of the pilot, though without allowing him to leave the country, may indicate that China is not eager to turn him into a bilateral issue, said James Zimmerman, a partner in the Beijing office of Perkins Coie, a global law firm.

“The fact that he was released is a critically important message and a positive sign — Beijing probably ordered his release to minimize the significance of the issue, and this is an indication that Beijing doesn’t want this case to be a huge distraction.” Mr. Zimmerman said.

The United States and China are trying to reach at least a partial truce in their 15-month trade war. Chinese officials have been eager to head off further tariffs that President Trump has planned to impose on Oct. 15 and Dec. 15, but are also loath to agree to the broad Chinese policy changes sought by the Trump administration.

In recent months, Chinese airports have visibly increased security measures. The authorities have paid particular attention to travelers going to or from Hong Kong, a semiautonomous Chinese territory where large and increasingly violent protests have taken place every weekend this summer.