Depart from the mainland to the Philippines (you can also enter Hong Kong and Macao with a passport), cross the border with a passport, come back from the Philippines with a passport to Macao, and then leave Macao with a passport to Gongbei ~ ~
You can't use a visa to enter Macao from Gongbei. Unless it is valid for many times and you can enter Macao for the second time, you can only enter Macao with a pass, and then leave Macao for Shanghai with a pass at the exit of Macao airport ~
Simply put, you can leave Chinese mainland, Hong Kong and Macao with your passport, and you can also enter Hong Kong, Macao and the mainland when you come back.
If your visa is multiple entry, you can use your passport to enter Macao for the second time. If it is a single trip, you must use a pass to enter Macao.
Passport: Mainland China (Hong Kong and Macao)-Philippines-Philippines-Macau-Gongbei (Hong Kong and Macao can transit visa-free).
Pass; Gongbei Exit-Macau Entry-Macau Exit-Gongbei Entry
In Zhuhai, I welcome you to Zhuhai ~ ~