Solved it by installing tensorflow-text 2.14.1 with no dependencies.
!pip install --no-deps tensorflow==2.14.1 tf_keras==2.14.1 tensorflow-text==2.14.0
Don't ask me why it works. Tried it by installing the version specified in the docs, and it didn't work either