Answered by Sjoerd from The Netherlands | Oct. 05, 2017 23:51
Not sure if you are correct on this one.... You would then pass immigration in Beijng (as Shanghai -Beijing is a domestic flight) on a 144 visa that was issued in Shanghai...
I asked the immigration officer this question just two days ago while leaving Shanghai: can I take a plane out of Shanghai while on a 144 visa?
It is OK to take a local (return) flight to for example Hangzhou or Nanjing (inside the Shanghai, Jiangsu, and Zhejiang provinces) instead of the train, as I did, as you don't pass immigration. When you pass immigration on a 144 visa it has to be for a flight directly out of China, without any transit inside China.
So, shortly, flying out of Shanghai on a flight to a third country with a transit inside China is not allowed.