(Just to give my personal experience in case anything resonates with your hip issue.)
When my right hip was (super) tight, I literally had to pull with all my strength to (barely) point the right knee to my left shoulder when lying down (it’s a hip stretch, you’re probably familiar with it). It turned out to be the cause of my extreme lower back soreness after deadlifting. Fortunately, I never had back issues from deadlifting, but once I loosened up my hip, the difference in soreness level was literally amazing.
I’m old, 56 1/2 now, and pretty much squat for “health” (look up some of Lee Boyce’s articles on TN). But back when I was trying to increase #s, I had issues with the right hip from squatting, nothing that painful but a nagging “always something there in the joint” kind of thing that started to worry me. What works for me is that I actually need to think of posteriorly tilting my right pelvis (I don’t know if tilting just one side of your pelvis is anatomically possible, but that’s my mental cue) before squatting down; and definitely not “knees out”. Conversely, strangely enough (or not), I have to do the opposite with my left side (knees out, let the hip do it’s thing with no cue from me); on my left side, I’ve also experienced patellar tendonitis (and still do if not careful) but that’s another long story.
My bro’ science conclusion from all this is that hip mobility is (extremely) important, but control of how one tilts their pelvis (as a right side/left side, and not just one way for both sides) is a key part of that.
Hope that wall of text helps you, you’re a good guy and I wish you luck with your rehab.