Adding a file or pattern to .gitignore doesn't refresh the Unstaged section.
It was working fine at some point, but now I have to manually refresh (Cmd+R) for the Unstaged section to clean itself.
Experienced on macOS, in version 2.40 and previously two or three versions before that.