I believe it has to do with hip flexion degree. I say this because I need a hip replacement and although I still squat and deadlift fairly heavy for me (and for someone with a hip as damaged as mine lol) my squats are limited to just above parallel box squats with a vertical torso or heels very elevated full squats with upright torso. My deadlifts are also either RDLs or almost straight leg with soft or slightly bent knees, no CDLs for me. Btw I always liked RDLs better anyway for hitting hams and whole posterior chain and you can still move decent weight. I'm still able to hit 345 for a 5-6 reps even with the blown out hip.
The reason for this is because bringing or flexing my knee any closer to my chest as in a CDL or in a conventional squat with a slight forward lean in my torso gives me excruciating pain in my hip and back. For example I can barely reach my foot to put on sock and shoe without difficulty and great pain.
I think the flexion angle is what might be giving you a problem. You probably get away with squats maybe because you can squat more upright and there's not a lot of hip flexion.
In any event take care of that hip you don't want to end up like me.