Yep yep I tried to empty the cache and everything but honestly, I could not really understand the state in which the Git repository is on the Netlify runner side.
I ended up using the default suggested command:
[build]
ignore = "git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF ."
And it just worked as expected.