lb-dev should force the version of the main dependency
The issue was reported recently on lhcb-core-soft:
$ lb-dev DaVinci/v46r0
$ cd DaVinci_v46r0
$ make
[...]
-- Found DaVinci: /cvmfs/lhcb.cern.ch/lib/lhcb/DAVINCI/DAVINCI_v54r1/InstallArea/x86_64_v2-centos7-gcc11-opt/lib/cmake/DaVinci (found version 54.1)
[...]