The problem was that I had set a CSS property that caused conflicts. It was written in the documentation:
html { scroll-behavior: smooth }