Have acquired a no user backup of troubled course and restored it to a non OHV site - 3.7.x version. No issues.
Have run a backup of that course deselecting some resources. Backup completed successfully. No 'lock dependency' issues with that on sandbox server.
What we might have been doing here is chasin' a rabbit down a hole here. Maybe 'we' (me) didn't understand about 'locked dependencies' ... in a course.
So, do you have completion tracking turn on in your course on your server? And requiring students (as an example) to view resource #1 *before* they can see/interact with resource #2?
https://docs.moodle.org/37/en/Course_completion_settings
If so, and you are attempting backing up the course without taking into account (as per example) the 'dependency' of resource #2 upon viewing/doing resource #1, trying to include in the backup only resource #2 excluding in the backup resource #1, might be the issue - thus 'lock dependency' error.
Above is a guess ...
'SoS', Ken