Subproject downloads dependencies higher version than in lockfiles

After locking dependencies, generating lockfiles successfuly for all subprojects with proper versions, project builds successfully, however adding versions range to dependencies.gradle (after generating lockfiles) causes build error with following messages:

Could not resolve all files for configuration 
Did not resolve 'org.elasticsearch.client:elasticsearch-rest-high-level-client:7.0.1' which has been forced / substituted to a different version: '7.10.0'
Did not resolve 'org.jboss.spec.javax.annotation:jboss-annotations-api_1.2_spec:1.0.0.Final' which is part of the dependency lock state

With similar messages for other dependencies.

In main project I locked all configurations by
allProjects{ dependencyLocking { lockAllConfigurations() } }
It also happens when I lock buildscript configurations with
buildscript { configurations.classpath { resolutionStrategy.activateDependencyLocking() } }

What is a possible solution to this?