That strikes me as outside the scope of a feasible version control tool (and is probably undecidable in most cases). Seems like you’d be much better off handling that with a test suite and CI.
For example, I have seen cases with diffing where based on whatever algorithm, a very small logical change, (like moving a function up or down in the file along with a minor edit), creates a very confusing side by side diff based on whatever similar lines it think match up.