Running pre-commit with sqlfluff returns the error:

Sqlfluff is in the root folder along with pre-commit-config.yaml. I have tried moving it to /dbt but the error persists.
I have tried changing templater = jinja to templater = dbt and it said:

But after pip installing sqlfluff-templater-dbt, restarting the terminal and VS code, the same error remains.
Here is how I am using dbt_utils:
select
{{ dbt_utils.generate_surrogate_key([
'date',
'start',
'end'
])
}} as hash
from {{ source('bronze', 'test') }}
This is my sqlfluff:
[sqlfluff]
dialect = databricks
templater = jinja
exclude_rules = structure.column_order
[sqlfluff:templater:jinja]
apply_dbt_builtins = true
[sqlfluff:templater:jinja:macros]
# Macros provided as builtins for dbt projects
dbt_ref = {% macro ref(model_ref) %}{{model_ref}}{% endmacro %}
dbt_source = {% macro source(source_name, table) %}{{source_name}}_{{table}}{% endmacro %}
dbt_config = {% macro config() %}{% for k in kwargs %}{% endfor %}{% endmacro %}
dbt_var = {% macro var(variable, default='') %}item{% endmacro %}
dbt_is_incremental = {% macro is_incremental() %}True{% endmacro %}
I have dbt/dependencies.yml as (and ran dbt deps prior):
packages:
- package: dbt-labs/dbt_utils
version: 1.1.1
Also, everything worked fine prior to my usage of dbt_utils so it's something to do with it. Appreciate the help!