Just point to the direct zip download for the stable 1.6.2 tag.
lib_deps =
https://github.com/NeiroNx/RTCLib/archive/refs/tags/v1.6.2.zip
in the platformio.ini
, possibly along your other needded libraries.
CC @ivankravets do you mind updating PlatformIO Registry to 1.6.2?