When the mesh is distributed over multiple processes, some points are present on multiple processes (along inter-process boundaries).
Use mesh.geometry.index_map.size_local to get the local number (the mesh nodes owned by the current process).
Secondly, you can use mesh.geometry.input_global_indices to map the local node i (mesh.geometry.x[i,:]) to the global input node in the GMSH model
Secondly,
correct me if i am wrong, domain.geometry.input_global_indices will give me a num_local sized array with global indices
and then to get the coordinates I need to read the mesh again on a single process and use domain.geometry.x[i,:] on global domain ???
As you have not provided a reproducible example, I have no idea how you are gathering the deformation across multiple processes, and therefore it is very hard to give you any guidance.
Please consider making a reproducible example.