[ONNX] Fix FindCommonAncestor in function_extraction (#86650)
One line fix to get absolute value of `diff` before looping over.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/86650
Approved by: https://github.com/AllenTiTaiWang, https://github.com/abock