Thank you for your reply in your busy time. Thank you for your advice.
I opened the adjoint_0.fsp simulation file with the optimized geometry shown as polygon, then run the python script with some commands copied from the original python script y_branch_opt_3D.py as shown below. I put Lumerical_GDS_auto_export.lsfx and the python file in the same folder as the adjoint_0.fsp simulation file. However, after running the python script, a GDS file was not generated.