When using version 3.7.1 for fabric, some classes aren't remapped correctly to their Yarn counterparts. This affects Identifier, Text and Screen from what I found so far
Fellteros commented
Sorry, false alarm, I used implementation instead of modImplementation in my build.gradle, now everything works