Transfer still depends on relationships, and cross-regional transfer is already very difficult. It's even harder for you to cross provinces. If you are a national civil servant, such as the State Administration of Taxation, if the employer can release the transfer and the other unit is willing to accept it, it is crucial for the provincial bureau to agree. And you want to transfer from Zhejiang to Shanghai, I guess you have to go through the general administration.
If it has nothing to do with you, it is empty talk to transfer Shanghai and Beijing to be a small official. If the relationship is good, it is not a problem to go anywhere.