If someone checks in a file and then it is added to gitignore, git status will show it as modified
git status
On branch main
Changes not staged for commit:
(use "git add ..." to update what will be committed)
(use "git restore ..." to discard changes in working directory)
modified: checkedinbeforeignored/somefile.txt
no changes added to commit (use "git add" and/or "git commit -a")`
Worktree.Status() ignores this change and subsequently IsClean() will return true, even though the native git client shows the change. I have made an example you can test this on here. If you clone it and modify checkedinbeforeignored/somefile.txt, native git status will show it modified, while Worktree.Status() does not.