I cannot add the parent directory to *safe.directory* in Git

After updating Git to v2.35.2.windows.1 I'm getting the following error: fatal: unsafe repository ('F:/GitHub/my-project' is owned by someone else) To add an exception for this directory, call: ...